One of the bundled macros, which displays a table of content 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 either inline or pullout (the latter being the default). The inline style renders the outline as normal part of the content, while pullout causes 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 numbered or unnumbered (the former being the default). This parameter only has an effect in inline style.
Range of Headings Displayed
[[PageOutline]]'s first parameter only appears to accept integers, and doesn't appear to have a coded value for displaying the default of all headings. It displays an error message when passed a non-integer value.
|[[PageOutline(1)]]|| Only level 1 heading: |
|[[PageOutline(1-2)]]|| Only first 2 levels of headings: |
|[[PageOutline(1-100)]]|| All headings — actually first 100 levels of headings: |
Apparently, in order to specify the title you must also give the range of headings; you can't just pass an empty first parameter (e.g. [[PageOutline(,Title)]] ).
|[[PageOutline(1-100,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 mislead you into thinking.
|[[PageOutline(1-100,Page Contents,inline)]]|| Ditto, but inline: |
Numbered / Unnumbered
Remember, only useful for inline contents.
|[[PageOutline(1-100,Page Contents,inline,unnumbered)]]|| Ditto, but without numbering: |
See also: trachacks:TocMacro