I use the anchor link feature frequently to allow for quickly navigating to different parts of long documents. In general on Confluence cloud the anchor link starts with # and is followed by the heading name I want to link to, but with spaces substituted for dashes (-). For example, to link to a "Message Reference" section, the anchor link would be #Message-reference
This works fine for the general case, but I'm finding that I can't create anchor links for headings that contain parentheses -- the heading text will be deleted on save. For example, for the heading "Configuration (First Phase)" the anchor link should be #Configuration-(First-Phase). Instead, when I save the document the link saves itself as simply #
The strange thing is that in the table of contents for the page, the generated link contains the correct anchor. However, any links that I create myself that have parentheses don't save properly. Is this a bug or am I doing something wrong?
Hi @Jen Garcia
The anchor itself doesn't need to match the heading text. You can provide alternate display text, see below
This is an interesting solution. Usually when I am creating anchor links I don't have to create the anchors manually -- headings automatically have anchors. In the case of your example, the automatic anchor would be #Progress-Summary. So my original complaint is about how it's not possible to create links to those automatic anchors if the heading text has special characters.
What you are suggesting here is to add an additional anchor to the problematic headings and name the anchor whatever I want. This does not use the automatic anchor created for headings but it does solve the problem. Thanks for the suggestion!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jen Garcia There is a difference between the link to a heading that you copy with the link icon displayed when you hover over a heading and a link to an anchor that you insert in a heading (or anywhere in text) that you want to link to.
I use an app to generate a website of my content for non-Confluence users and have found that links to headings in other pages only go to the page, rather than the heading on the page, while links to anchors go to the heading or text on the page.
Also, if you change the text of the heading without changing the name of the anchor, any links you've already created still work. I suspect that links to the heading might not work (since changing the heading text changes the link to that heading).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.