Displays a table of contents based on the headings on the page. |
|
Parameter | Default | Description |
|---|---|---|
Output Type | list |
|
Display Section Numbering | clear | Select the check box to apply outline numbering to your headings, for example: 1.1, 1.2, 1.3. |
List Style | disc | Select the style of bullet point for each list item. You can use any valid CSS style. For example:
|
Heading Indent |
| Sets the indent for a list according to CSS quantities. Entering |
Separator | brackets | This parameter applies to flat lists only. You can enter any of the following values:
|
Minimum Heading Level | 1 | Select the highest heading level to start your TOC list. For example, entering 2 will include levels 2, and lower, headings, but will not include level 1 headings. |
Maximum Heading Level | 7 | Select the lowest heading level to include. For example, entering 2 will include levels 1 and 2, but will not include level 3 headings and below. |
Include Headings |
| Filter headings to include according to specific criteria. You can use wildcard characters. See Sun's Regex documentation for examples of constructing regular expression strings.
|
Exclude Headings |
| Filter headings to enclude according to specific criteria. You can use wildcard characters. See Sun's Regex documentation for examples of constructing regular expression strings.
|
Printable | checked | By default, the TOC is set to print. If you clear the check box, the TOC will not be visible when you print the page. |
CSS Class Name |
| If you have custom TOC styles in your CSS style sheet, use this parameter to output the TOC inside |
Absolute URL(absoluteURL) | By default, the links in the TOC are relative URLs pointing to the current page. If checked, the links in the TOC will be full URLs. This setting is useful when you are including a page with a Table of Contents in another page, and want to control where the links should take the user. |
The examples below are based on this table of contents:

This example filters the headings to include those that contain 'Favourite', but excludes headings which end with 'Things'. The list is styled with Roman numerals.
| Parameter | Value |
|---|---|
| List Style | upper-roman |
| Include Headings | Favourite.* |
| Exclude Headings | .*Things |
The resulting table of contents is:

This example filters all headings to render a flat list of 'Unknowns' enclosed in square brackets (the default list style).
| Parameter | Value |
|---|---|
| Output Type | flat |
| Maximum Heading Level | 2 |
| Include Headings | Unknown.* |
The resulting table of contents is:
![]()
Using HTML heading markup with the Table of Contents macro
The Table of Contents macro cannot handle HTML heading markup on its own. Hence, if you use the HTML and HTML Include macros to render HTML heading markup in a Confluence page, the Table of Contents macro will not create a contents list out of these headings. (For more information about this issue, please refer to TOC-93.)
However, if you insert an HTML anchor into each HTML heading on your page (based on the following syntax), the Table of Contents macro will incorporate these headings into your contents list.
<h2><a name="pagename-headingname"></a>Heading Name</h2> |
The syntax for the anchor name is the page name and heading name separated by a hyphen. Remove all spaces and convert all text to lower case. Convert all punctuation marks to their URL-encoded equivalent.
See: