Forums

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

How to make Table of Contents find content in Expand macros

Ashley Honeycutt
Contributor
January 10, 2024

Hi all,

By default, links in the Table of Contents for a Confluence page will not take you to the content if it's nested in an Expand macro that is collapsed. If the section is expanded, then it is able to find it. I understand that is expected behavior and not a bug.

Is there a workaround for this? I have users with fairly complex Confluence pages and they would like to be able to keep using the Expand macros because it keeps things tidy, but it also makes it so they can't easily navigate to content in those macros from the ToC.

Any suggestions are greatly appreciated. Thank you!

1 answer

2 votes
Laurie Sciutti
Community Champion
January 10, 2024

HI @Ashley Honeycutt ~ how about adding a Header (either above the Expand macro or within the Expand macro)?

Kristian Klima
Community Champion
January 10, 2024

Exactly, a simple tweak of the content would do the trick.

Example:

 

Heading about something

Expand the following section to learn more about whatever the Heading hints at.

EXPAND MACRO.

 

This way you're actually making it obvious to the reader there's an actionable item ahead.

Like # people like this
Barbara Szczesniak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2024

So, I guess the key is to not put headings at a level that will appear in your TOC within the expand macro. 

It all comes down to planning your organization of the information and (maybe) only including Heading 1s and 2s in your TOC macro.

Like Kristian Klima likes this
Kristian Klima
Community Champion
January 12, 2024

Yes @Barbara Szczesniak a little adjustment in the information architecture.

BTW, the best practice is to reserve H1 for the page title and only use H2, H3 etc. within the actual page content.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events