Shows a Table of Contents that is generated automatically based on headings of a topic. Headings in TopicMarkupLanguage ("---++ text") and HTML ("<h2>text</h2>") are taken into account. Any heading text after "!!" is excluded from the TOC; for example, write "---+!! text" if you do not want to list a header in the TOC
Parameters
Parameter
Description
Default
"TopicName"
topic name
Current topic
web
Name of web
Current web
depth
Limit depth of headings shown in TOC
6
title
Title to appear at top of TOC
align
Align at left or right side of the page
id
Optional ID in case multiple TOCs are on the page and each TOC needs to be addressable with an anchor link. Allowed characters: a-zA-Z0-9-_, no spaces. If you don't specify an id, the anchor foswikiTOC can be used in a link to the first TOC: [[#foswikiTOC][Back to TOC]] creates Back to TOC. Multiple TOC macros will increment the generated ID. #foswikiTOC, #foswikiTOC2 …
If multiple headers have the exact same text, the anchors for the 2nd, 3rd etc will be suffixed by _AN1, _AN2 etc so the anchors become unique.
If other topics are included using INCLUDE then any headingoffset specified on the INCLUDE macro will not be seen by TOC.