Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to display a list of sub-pages AND their content on parent page?

Eric Thomas September 21, 2017

Hello. 

How do I create a page list (on the left pane of the Pages screen) which maps to H1-H4's in my document?

I do not want a TOC in each page, but rather a TOC (page list) to display links to H1-H4's in a single page. 

Example Page List: 

1. Safety

1.1 Safety Training

1.1.1 Classes

1.1.1.1 Student Guide

1.2 Safety Tests

1.2.1 etc. 

1.2.1.1 etc. 

Each of the above is a link to a heading (H1-H4) in the actual document

Thoughts? 

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2017

Hi Eric,

While it's possible to add macros in the sidebar via Space Tools > Look and Feel > Sidebar, Header, and Footer, it appears the links in TOC will not work properly due to this bug:

You're welcome to test it but you may run into the same error above.

In your title, you also mentioned you wanted to include content. Can you please elaborate on that? Do you have an example of how it needs to look?

Kind Regards,
Shannon

Eric Thomas September 22, 2017

Thanks for the prompt reply. Please see screenshot for what I need to accomplish with our docs if we are to use Confluence. 

Notice the URL has "#safety-training". This is the anchor I placed in the text next to "1.1 Safety Training" in the actual text. 

When I click "1.1 Safety Training" in the TOC on the left, it will take me to that part of the text no matter where I am in the doc.

This is the same for all links in the TOC. One document with anchors at each H1, H2, and H3 all linked to the TOC. 

2017-09-22_11-18-06.png

Eric Thomas September 22, 2017

Please disregard the "..and their content in the parent page." Somehow my question was placed under this existing question title. 

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2017

Eric,

Thank you - so you're not actually using the TOC macro or are you? Are you simply linking those pages to anchor links? 

Lastly, what version of Confluence are you using?

Kind Regards,
Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events