cross-page links including anchors

Stefan Seefeld June 17, 2021

I'm trying to link from a page into another page (using an anchor), following the documentation , but I'm encountering a couple of problems:

1. case:

My target page contains a TOC, so I'm copying the link to the target section, then, in the "insert link" popup, in the "advanced" tab, paste that as URL. (Saving this works fine.) As the URL is absolute, but I do want an "intra-space" link, I'm editing the URL to remove the the prefix ("http://confluence/display/~sseefeld/") to only follow the schema "<page name>#<anchor-name>"

This no longer works, as it appears as if Confluence would automatically prefix the link with "http://", so I get an invalid link.

 

2. case:

Rather than using an existing anchor from my target page, I'm adding a new anchor to my target page using the anchor macro. Contrary to the advice given in the above referenced documentation, the real anchor name isn't the name I gave when using the macro, but is a long name including the page name.

Trying to use a link following the <page-name>#<anchor-name> also yields an invalid link as it appears as if Confluence injects a '/' between page-name and anchor-name.

 

Any advice on how to proceed ? (I really do need relative intra-space links, as both pages are part of a "document" (Using the Scroll Document plugin), and I want the link to be handled correctly when exporting the document to PDF.

 

1 answer

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2021

@Stefan Seefeld Welcome to the Atlassian Community.  

There is not a good way to create relative links.  Navigation Macros kind of work this way like the table of content macro.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events