Considering Confluence Cloud?
Get the high-level details of Confluence Cloud and available features by plan.
The table of contents macro scans the headings on the current Confluence page to create a table of contents based on those headings. This helps readers find their way around lengthy pages by summarizing the content structure and providing links to headings.
To add a table of contents to your page:
When editing, select from the toolbar
Find the macro by name and select it
Configure it as needed
You can also type / on the page to bring up the same list you'd see by selecting from the toolbar. Continue typing the name of the macro to filter the list.
To configure your table of contents:
Select the macro placeholder.
Select the Edit icon to open the configuration panel.
Configure the parameters. Your changes are saved as you go.
Resume editing the page, and the panel closes.
You can also select the centered , medium-width , and full-width icons to adjust the width of some macros. Select the trashcan iconto remove the macro.
The table of contents macro offers Basic or Advanced configuration options.
Your selections will display immediately. When you preview the page or publish it, you’ll be able to check how your customized table of contents looks.
When you use a table of contents macro in a template, it won’t render in the template itself. But the macro will always work on pages created from the template after the page has been saved.
The macro only displays page or blog post content. Any text formatted as a heading can be included in your table of contents, along with heading-formatted emojis, mentions, statuses, and dates.
The macro only works within the page, blog, or macro to which it has been added, and cannot reference or be referenced across multiple pages or blogs. When added to an excerpt macro, for example, it will only display headings located inside the excerpt and those heading links won’t navigate to the source page.
To customize your table of contents, you can configure its basic and/or advanced parameters.
Basic parameter | Default | Description |
---|---|---|
Display as | Vertical list |
|
Bullet style | Bullet | This parameter applies to vertical lists only. Select from any of the following values:
|
Separate sections by | Bracket | This parameter applies to horizontal lists only.
|
Include heading levels from [#] to [#] | 1 to 6 | Select the minimum and maximum heading levels to include in your table of contents. |
Include section numbers | Unchecked | Select the checkbox to apply outline numbering to your headings. As an example: section 1.1, 1.2, 1.3. |
If the parameter name used in Confluence Cloud storage format is different than the label used when inserting macros with the browser or the slash command, it will be listed below in brackets (example).
Advanced parameter | Description |
---|---|
Indent headings | Sets the indent for a vertical list according to a valid CSS unit value. |
Include headings with: | Filter headings to include in your table of contents by inputting specific criteria. You can use wildcard characters and this field is case sensitive. As an example, if you only want headings with the words “Overview” and “Summary” to appear, you’d enter Overview|Summary in this field. |
Exclude headings with: | Filter headings to exclude from your table of contents by inputting specific criteria, separated by vertical lines { | }. This field is case sensitive. As an example, if you want to exclude headings with the words “Overview” and “Summary” from the table of contents, you’d enterOverview|Summary in this field. |
CSS class name | If you have custom table of contents styles in your CSS style sheet, use this parameter to output the table of contents inside <div tags with the specified class attribute. |
Exclude in PDF export | If the box is checked, the table of contents will not be visible when you export the page to PDF or print it. |
Was this helpful?