One of the bundled macros, which displays a table of contents for the Wiki page in which the macro is inserted.
Display a structural outline of the current wiki page, each item in the outline being a link to the corresponding heading.
This macro accepts four optional parameters:
- The first is a number or range that allows configuring the minimum and maximum level of headings that should be included in the outline. For example, specifying "1" here will result in only the top-level headings being included in the outline. Specifying "2-3" will make the outline include all headings of level 2 and 3, as a nested list. The default is to include all heading levels.
- The second parameter can be used to specify a custom title (the default is no title).
- The third parameter selects the style of the outline. This can be
pullout(the latter being the default). The
inlinestyle renders the outline as normal part of the content, while
pulloutcauses the outline to be rendered in a box that is by default floated to the right side of the other content.
- The fourth parameter specifies whether the outline is numbered or not.
It can be either
unnumbered(the former being the default). This parameter only has an effect in
For trac-hack / plugin descriptions, the standard format is as follows:
Range of Headings Displayed
[[PageOutline]]'s first parameter only accepts integers, and doesn't have a coded value for displaying the default of all headings. It displays an error message when a non-integer value is passed.
|[[PageOutline(1)]]||Only level 1 heading:|
|[[PageOutline(1-2)]]||Only first 2 levels of headings:|
To specify the title, you must also give the range of headings. You can't just pass an empty first parameter, such as [[PageOutline(,Title)]].
|[[PageOutline(1-6,Page Contents)]]||A title over 'all' headings — actually the first 100 levels of headings:|
Inline / Pullout
'Inline' means 'part of the content' and not a floating box; it doesn't mean the text is a list without linebreaks, as one's HTML background might suggest.
|[[PageOutline(1-6,Page Contents,inline)]]|| Ditto, but inline: |
Numbered / Unnumbered
Only useful for inline content.
|[[PageOutline(1-6,Page Contents,inline,unnumbered)]]||Ditto, but without numbering:|
See also: trachacks:TocMacro