This template is used on approximately 6,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
The pages listed in this category are templates.
This page is part of OODA WIKI's administration and not part of the encyclopedia.
Further template category notes
This category contains pages in the template namespace. It should not be used to categorize articles or pages in other namespaces. To add a template to this category:
|
This category is an index of templates which use TemplateStyles. It is automatically populated by {{Uses TemplateStyles}}.
This template does not work properly in the Vector 2022 skin. Read the documentation for an explanation. |
This template lays out the table of contents in a horizontal list rather than a vertical one.
Usage
{{horizontal TOC}}
There is no need to specify __NOTOC__
: this template handles that automatically.
To hide the generated heading numbers, use:
{{horizontal TOC|nonum=yes}}
To suppress the parentheses around subsection lists, use:
{{horizontal TOC|noparens=yes}}
To limit the depth of the generated headings to the first headings only, use:
{{horizontal TOC|limit=2}}
To float the table of contents to the center of the page, use:
{{horizontal TOC|align=center}}
For country and state lists with flag icons, see these examples: Legality of cannabis by country. And: Legality of cannabis by U.S. jurisdiction.
Limitations
Since the Vector 2022 skin forces the table of contents into a sidebar or a pop-up menu, this template does not control the placement of the TOC in that skin.
See also
- Help:Table of contents
- {{Compact TOC}}
- {{List TOC letters}}
- {{Nonumtoc}}
This template lays out the table of contents in a horizontal list rather than a vertical one.
Parameter | Description | Type | Status | |
---|---|---|---|---|
No numbers | nonum | Hide the generated heading numbers
| String | optional |
Limit | limit | Limits the depth of subheadings shown. For instance using limit=4 will hide the fourth level and deeper subheadings in the hierarchy. And limit=2 will hide all subheadings leaving only the main headings. This works by hiding the lower levels with CSS | Number | optional |
No parenthesis | no_parenthesis noparens | Separates entries by bullets, regardless of sub-sections.
| String | optional |
Align | align | Which side of the page to align the ToC to. Allowed values are left, right, center
| String | optional |
Clear | clear | Align underneath floating images and tables or not. Allowed values are left, right, both, none
| String | optional |
Links | links | Specify a list of links for the table of contents instead of the section links automatically generated by the TOC magic word
| String | optional |