This is a documentation subpage for Template:Horizontal TOC. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 6,200 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. |
This template 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.
((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.
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.