Excerpt & Table of content macros are not compatible

Cyril Poch July 1, 2021

As mentioned in this topic (https://community.atlassian.com/t5/Confluence-questions/Display-a-Working-Table-of-Contents-on-a-Different-Page/qaq-p/125911), I wanted to insert a TOC inside an excerpt, only now my TOC is empty apart from titles within the excerpt. Do anyone knows why the TOC cannot retrieve headings from the rest of the page anymore ? And how to fix it without having to put whole pages inside excerpts ?

Screenshot 2021-07-01 at 09.26.53.png

From this picture up there to this view down there :

Screenshot 2021-07-01 at 09.27.07.png

3 answers

0 votes
Oscar Zhang August 5, 2021

For where the main page/info is - insert the excerpt on top / outside of the excerpt and it will display all the headings. Screenshot 2021-08-05 084005.png

 

and for the pages where you're inputting the excerpt - utilize the "Table of Contents Zone" macro and this will display only the ToC for the excerpt. hope this helps! 

0 votes
John Molomby August 5, 2021

There are some outdated answers floating around – using ToCs in excerpts and including the excerpts directly on the root page doesn't seem to work.

However, I've managed to achieve the same effect using excerpts on the child pages (containing ToC macros) and a children display macro on the root page with "Excerpt Display" set to "Rich content".

Remember to also check "Absolute URL" on your ToC macros.

Weirdly, the excerpt content doesn't appear on the child pages when published (even when "Hide Excerpted Content" is unchecked). So if you want ToCs on the child pages too, you might need to have a second ToC macro outside the excerpt macro.

No idea how stable this solution will be though.

0 votes
Roger Rodrigo July 6, 2021

It happens the same to me

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events