Template:TOC

From Space Station 14 Wiki
Revision as of 07:35, 24 August 2024 by Aliser (talk | contribs) (Created page with "<includeonly>{{#vardefine: toc_depth_css_class | {{#switch: {{{depth|6}}} | 2 = toclimit-2 | 3 = toclimit-3 | 4 = toclimit-4 | 5 = toclimit-5 }}}}<!-- -->{{#vardefine: toc_float_css|<!-- -->{{#ifeq: {{#vardefineecho: toc_float|{{lc:{{{float|none}}}}}<!--/vardefine-->}}<!-- -->|none<!-- -->|<!-- -->|float: {{#var:toc_float}};<!-- -->}}<!-- -->}}<!-- --><div class="{{#var:toc_depth_css_class}}" style=" {{#var: toc_float_css}} ">__T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Template documentation
view or edit this documentation about template documentation
Has an alias
This template has an alternative name:

Since TOC relies on a page contents and can only be used once, the examples isolated into separate pages:

Page Description
Template:TOC/examples/basic Basic usage with no params.
Template:TOC/examples/depth param "depth" param example.
Template:TOC/examples/float param "float" param example.

TOC with extra shenanigans, such as hiding deep headers or floating the TOC right or left. Note that this template forces the TOC onto the page, regardless of the number of headers on the page. This template uses the regular TOC, so all its quirks and limitation apply too (e.g. displaying only the latest TOC).

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Depthdepth

The depth of headers shown in the TOC. Default is «6» (all headers).

Suggested values
2 3 4 5 6
Default
6
Linesuggested
Floatfloat

Floating of the TOC. Any casing (including lowercase) is supported.

Suggested values
Left Right None
Default
None
Stringsuggested