The Table of Contents macro scans the headings of the current Confluence page to dynamically create a table of contents from your page headings. This helps you navigate lengthy pages by summarising the content structure and providing links to headings. Headings are indented progressively.
On this page:
1. From the Rich Text Editor toolbar, select Insert, then select Table of Contents from the drop-down menu.
2. From the 'Insert 'Table of Contents' Macro' dialog box, select the required parameter values, then click 'insert' to add the table of contents to your page.
To insert the 'Table of Contents' macro into a page using the Macro Browser,
|
Once you've found the table of contents macro and have added the required parameter values, click 'insert' to add it to your page. |
Include the following markup in your page:
{toc:type={[list,flat]|outline=[true,false]|style=[circle,square,disc,decimal,lower-roman]|indent=[5px]|minLevel=1|maxLevel=3} |
There are more examples below.
パラメーター |
必須かどうか |
既定 |
説明 |
|
|---|---|---|---|---|
Output Type |
いいえ |
list |
Set this to "list" or "flat". Selecting list produces a typical list type TOC. Selecting flat produces a horizontal menu-type series of links, for example: [Heading 1] [Heading 2] [Heading 3]. |
|
Display Section Numbering |
いいえ |
false |
Select the tick box to apply outline numbering to your headings, for example: 1.1, 1.2, 1.3. |
|
List Style |
いいえ |
なし |
Use this parameter to select the style of bullet point for each list item. You can use any valid CSS style. For example:
|
|
Separator |
いいえ |
brackets |
This parameter applies to "flat" lists only. Use this parameter to style the display of a "flat" or horizontal list. You can enter any of the following parameters:
|
|
Indent |
いいえ |
|
Use this parameter to style the indent for a "list" according to CSS quantities, entering "10px" will successively indent list heading groups 10px. For example, h1 headings will be indented 10px and h2 headings will be indented an additional 10px. |
|
Minimum Heading Level |
いいえ |
1 |
Use this parameter to select the heading level to start your TOC list. For example, 2 will list h2, h3, and h4 headings, but will not include h1 headings. |
|
Maximum Heading Level |
いいえ |
7 |
Use this parameter to select the maximum heading levels to include. For example, 2 will list h1 and h2, but will not include h3 and below. |
|
Include Headings |
いいえ |
|
Use this parameter as a way of filtering to include headings according to specific criteria. You can use wildcard characters to filter the headings. See Sun's Regex documentation for examples of constructing regular expression strings.
|
|
Exclude Headings |
いいえ |
|
Use this parameter as a way of filtering to enclude headings according to specific criteria. You can use wildcard characters to filter the headings. See Sun's Regex documentation for examples of constructing regular expression strings.
|
|
Printable |
いいえ |
true |
By default, the TOC is set to print. If you set this parameter to |
|
CSS Class Name |
いいえ |
|
If you have a custom TOC in your CSS style sheet, you can use this parameter to output the TOC with the specified "class" attribute. |
この例は、次のヘッダーが付いたページに基づいています。
h1. Places h2. Favourite Places h2. Unknown Places h1. Foods h2. Favourite Foods h2. Unknown Foods h1. Things h2. Favourite Things h2. Unknown Things |
This will display all level 1 and level 2 headings as numbered lists.
{toc:style=decimal|maxLevel=2} |
Screenshot: Basic TOC example
This will filter all headings to include those that contain "Favourite", but will exclude any heading which ends with the word "Things'. The list is styled with Roman numerals. It will not display on the printed page.
{toc:style=upper-roman|indent=10px|maxLevel=2|include=Favourite.*|exclude=.*Things|printable=false} |
Screenshot: Filtered TOC example
This will filter all headings to render a flat list of 'Unknowns' enclosed in square brackets.
{toc:type=flat|maxLevel=2|include=Unknown.*} |
Screenshot: TOC displayed as flat list
<h2><a name="pagename-headingname"></a>見出し名</h2> |
Table of Contents Zone Macro
Pagetree Macro
Adding a Navigation Sidebar
Working with Macros
Take me back to the Confluence User's Guide.