Highlighted

Can't add relative web link in TOC (RH 2017)

Community Beginner ,
Sep 27, 2018

Copy link to clipboard

Copied

Hi,

Using RH 2017, I am trying to add a web link in the TOC (top level) as a relative link. I am generating Responsive output using Charcoal Grey layout.

If I add a new TOC page with just the relative link (i.e. ../../blahblah.htm) the link becomes corrupted on generation, and RH changes it to ..\\..\\blahblah.htm

Is there a way to prevent RH from altering the link?

Experiments I have tried:

  • Enter the link as Link to Web Address http://../../blahblah.htm, then remove the http:// from the url and generate.
    This makes no difference.
  • Enter the link as above (without removing the http://) and generate. Then go to the whxdata folder in the output and edit the toc.new.js file to remove the http:// from the url.
    This works.

Unfortunately, these are projects that are updated frequently, so the second option does not present a realistic work-around for us.

Anyone got any other ideas on how to "protect" these links? Maybe modifying the .js file that generates the TOC so they'll be left unchanged on output?

Thanks,

Jeanne

Hi there

While I don't have a solution for preventing the change that breaks things I can think of a workaround that is fairly straightforward.

Create a topic in your project that you will link to from the TOC. Then configure the topic to perform a redirect to the desired location.

To perform a redirect, you edit the HTML of the topic code to add a special meta tag that refreshes the location to the desired location.

<meta HTTP-EQUIV=refresh CONTENT="0;URL=First_Topic.htm">

Of course you will change the bit reading First_Topic.htm to be your URL. (../../blahblah.htm)

Give that a go and see how you fare... Rick

Topics

HTML5 layout

Views

172

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Can't add relative web link in TOC (RH 2017)

Community Beginner ,
Sep 27, 2018

Copy link to clipboard

Copied

Hi,

Using RH 2017, I am trying to add a web link in the TOC (top level) as a relative link. I am generating Responsive output using Charcoal Grey layout.

If I add a new TOC page with just the relative link (i.e. ../../blahblah.htm) the link becomes corrupted on generation, and RH changes it to ..\\..\\blahblah.htm

Is there a way to prevent RH from altering the link?

Experiments I have tried:

  • Enter the link as Link to Web Address http://../../blahblah.htm, then remove the http:// from the url and generate.
    This makes no difference.
  • Enter the link as above (without removing the http://) and generate. Then go to the whxdata folder in the output and edit the toc.new.js file to remove the http:// from the url.
    This works.

Unfortunately, these are projects that are updated frequently, so the second option does not present a realistic work-around for us.

Anyone got any other ideas on how to "protect" these links? Maybe modifying the .js file that generates the TOC so they'll be left unchanged on output?

Thanks,

Jeanne

Hi there

While I don't have a solution for preventing the change that breaks things I can think of a workaround that is fairly straightforward.

Create a topic in your project that you will link to from the TOC. Then configure the topic to perform a redirect to the desired location.

To perform a redirect, you edit the HTML of the topic code to add a special meta tag that refreshes the location to the desired location.

<meta HTTP-EQUIV=refresh CONTENT="0;URL=First_Topic.htm">

Of course you will change the bit reading First_Topic.htm to be your URL. (../../blahblah.htm)

Give that a go and see how you fare... Rick

Topics

HTML5 layout

Views

173

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
LEGEND ,
Sep 27, 2018

Copy link to clipboard

Copied

Hi there

While I don't have a solution for preventing the change that breaks things I can think of a workaround that is fairly straightforward.

Create a topic in your project that you will link to from the TOC. Then configure the topic to perform a redirect to the desired location.

To perform a redirect, you edit the HTML of the topic code to add a special meta tag that refreshes the location to the desired location.

<meta HTTP-EQUIV=refresh CONTENT="0;URL=First_Topic.htm">

Of course you will change the bit reading First_Topic.htm to be your URL. (../../blahblah.htm)

Give that a go and see how you fare... Rick

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Sep 28, 2018

Copy link to clipboard

Copied

Thanks Rick. I will try this and report back.

Jeanne

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Sep 28, 2018

Copy link to clipboard

Copied

Hi Rick,

Works well.

We actually ended up using a .js redirect (because the link needs to be customized using a bookmark name, then parsed, to go to a specific page).

Thanks so much,

Jeanne

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Captiv8r LATEST
LEGEND ,
Sep 28, 2018

Copy link to clipboard

Copied

Hey, whatever works for you. I'm guessing that my suggestion got you (or someone you bounced it off of) to consider the JavaScript approach. And it really doesn't matter in the end. So hopefully problem solved and all is well! Happy you have a working solution!

Cheers... Rick

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...