Invalid links for anchors in HTML-file

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Maria Kazakova
Posts: 2
Joined: Mon Jan 13, 2020 1:43 pm

Invalid links for anchors in HTML-file

Unread post by Maria Kazakova »

Hello,

I have an HTML output (let us call it ReadMe). This file has a single page with a short table of contents (ToC) created via anchors and is not included in a large project.
When opening it locally, all links in ReadMe are valid.
But after renaming the file, I may occur the error when clicking the link in the ToC, as the anchor includes the filename (<a href="file.html#anchor">link text</a>).
To avoid this situation, the links inside a page should be like <a href="#anchor">link text</a>.

Could you please explain the reason why Help+Manual includes the filename in links to anchors on the same page? Are you planning to change this behavior, or maybe suggest a workaround to me?
User avatar
Tim Green
Site Admin
Posts: 23157
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Invalid links for anchors in HTML-file

Unread post by Tim Green »

Hi Maria,
Maria Kazakova wrote: Mon Sep 06, 2021 10:59 am Could you please explain the reason why Help+Manual includes the filename in links to anchors on the same page? Are you planning to change this behavior, or maybe suggest a workaround to me?
This is correct and intended. It doesn't need to be changed.
But after renaming the file, I may occur the error when clicking the link in the ToC
Please never rename anything in WebHelp after generating it. That will always cause errors, because everything is tightly integrated and all links are set correctly automatically. If you want to have it with a different name you must republish from Help+Manual with the name that you want, then the links will also be correct.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply