Can you have links from one page to a section in anohter page?
Asked by Mitch McKinnon:

My manager is insistent that I use Confluence to author a large, complex construction specification. This could be a dozen+ chapters (presuming each chapter would be a Confluence page). I would need active links (hot links) for a TOC, and links from one section to another, often across pages/chapters.  
The only way I've found to do active links is by applying anchors, then creating links to those anchors. Would this work across pages/chapters?  
(note that the end result is needed to be a PDF, for distribution outside of Confluence. Seems to me to be risky, and a lot of extra work).

I've experimented with anchors within a single page, and have succeeded with active links in the TOC (with the TOC macro applied after anchors are in place), and linking from the text of a given section to an anchor elsewhere in the page. But I haven't seen how to do this across pages. Nor do I see how to include multiple pages in the creation of the TOC.


Answers:
author: Barbara Szczesniak
body: [@Mitch McKinnon](/t5/user/viewprofilepage/user-id/5114642) Yes, you can insert a link to an anchor on another page; it can even be a page in a separate space. See this page: <https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/>

You don't need to have anchors for your TOC macro to work; you can just specify what heading levels to include in the TOC within the parameters of the macro (<https://support.atlassian.com/confluence-cloud/docs/insert-the-table-of-contents-macro/> ).

If you need a list links to the pages under a specific parent page, you can use the Child Pages macro (<https://support.atlassian.com/confluence-cloud/docs/insert-the-children-display-macro/> ).

With regards to generating a PDF from your space, if you are a Space Admin, you can export the space as a PDF (<https://support.atlassian.com/confluence-cloud/docs/export-content-to-word-pdf-html-and-xml/#Export-a-space> ). This feature generates a TOC in your PDF for you.

With the native Confluence export space to PDF, however, I saw in my instance that:

* links to an anchor on the same Confluence page work within the PDF
* links to another Confluence page or an anchor on another page open the page in Confluence, rather than jumping to the location in the PDF.

comments: author: Mitch McKinnon
body: Thank you Barbara!  
I'll tuck this info away for (near) future reference.

Your observed behavior of links in PDF files to anchors on another page opening that page in Confluence causes me concern. But I'll just have to tinker with it.


author: Laurie Sciutti
body: Hey [@Mitch McKinnon](/t5/user/viewprofilepage/user-id/5114642) \~ have you looked at the Page Tree macro? It's basically a TOC but of all your pages instead of headings on a single page....

comments: author: Mitch McKinnon
body: Yes, thanks. I didn't try that as far as live links go.  
I'm mostly concerned with links across pages for spec references (e.g., "see section 1.2.3.4 - Building a Big Thing), which reside in a different page.

I'll tinker with the page tree as well.

Thanks!


author: M?rten Woxberg
body: You can link to anchors #


Tags: cloud

confluence-cloud