Categories: Contributor News

Linking to anchors in the Knowledge Base

Editor’s Note: Written by Chris Illias.

If you are writing a knowledge base article, the current method of providing a link to another KB article unfortunately does not support anchors (bug 398768). This means that if you are writing an article, and want to provide a link to default profile locations, ((Profiles#Profile_folder_locations)) will not work. Some people are working around this by using [/kb/Profiles#Profile_folder_locations|Profiles].

While this does work, it is going to create problems in the long run. We are still renaming the odd article here and there. If you use ((articlename)), and we rename the target article, that link gets automatically updated. If you use the square brackets method, the links to the article are not updated.

So please, do not link to anchors in other articles, until bug 398768 is fixed.

The same goes for links to anchors within the same article. If I remember correctly, there’s a proper tikiwiki way to do that, which we are trying to recall.

3 comments on “Linking to anchors in the Knowledge Base”

  1. Jesper Kristensen wrote on

    Why would renaming an article matter? Articles should still be available at their old URL. (Cool URIs don’t change)

  2. Martijn wrote on

    You’d better also then remove Nelson’s recommendation from Bugzilla:
    Or add a comment to this bug yourself pointing to this blog entry. Otherwise someone might still think that this is the recommended workaround for pointing to anchors in other articles within the short term.

  3. Chris Ilias wrote on

    Jesper, if we can stay the course, without resorting to workarounds, all links from one article to another will be automatically updated.

    Martijn, thanks. I’ll post on the bug.