Skip to main content
Known Participant
September 27, 2018
Answered

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

  • September 27, 2018
  • 1 reply
  • 580 views

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

This topic has been closed for replies.
Correct answer Captiv8r

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

1 reply

Captiv8r
Captiv8rCorrect answer
Legend
September 28, 2018

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

Known Participant
September 28, 2018

Thanks Rick. I will try this and report back.

Jeanne