Create a table of contents on the top page that includes TOCs from child pages?

Hi, 

I'd like a macro similar to the standard table of content that as the option to include all the child pages table of contents too.. Therefore when exporting to PDF the top page and lower pages the top page includes the full table of contents similar to any word document. I understand its best to create pages like chapters of a book (child pages) and top page is the table of contents for the whole book and a short introduction (prologue) to the book itself. 

Ideally if at all possible to be able to number the headings too option would be the icing on the cake,

Thanks 

Mark

3 answers

2 accepted

1 vote
Davin Studer Community Champion Sep 26, 2017

To build upon the answer that @Peter DeWitt gave ...

On your parent page add the "Children Display" macro with the "Excerpt Display" option set to rich content.

Then on your child pages add an Excerpt macro at the top and inside that macro add a Table of Contents macro and set the options of the TOC macro like this ...

  • Outpust Type - list
  • List Style - disc
  • Minimum Heading Level - 1
  • Maximum Heading Level - 6
  • Printable - checked
  • Absolute URL - checked

Then on your child pages simply put in your content. You parent page will show the child pages and their TOC's in a tree format.

0 vote
Peter DeWitt Community Champion Sep 26, 2017

Mark, trying using a combination of the Excerpt / Excerpt Include Macros.  You can wrap the ToC on the child pages in an Excerpt and display them in the parent page using the Excerpt Include.

 

-pd

Worked a treat thanks alot Mark

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

450 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you