• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.213
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Horizontal TOC

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here

Contents

  • 1 Usage
  • 2 See also
Template documentation[view] [edit] [history] [purge]
CSSThis template uses TemplateStyles:
  • Template:TOC limit/styles.css
  • Template:Horizontal TOC/styles.css
  • Template:Horizontal TOC/horizontal-toc-no-parentheses.css

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.

  • See example

To hide the generated heading numbers, use:

{{horizontal TOC|nonum=yes}}
  • See example

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}}
  • See example

To float the table of contents to the center of the page, use:

{{horizontal TOC|align=center}}
  • See example

For country and state lists with flag icons, see these examples: Legality of cannabis by country. And: Legality of cannabis by U.S. jurisdiction.

See also

  • Help:TOC
  • {{Compact TOC}}
  • {{List TOC Letters}}

This template lays out the table of contents in a horizontal list rather than a vertical one.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
No numbersnonum

Hide the generated heading numbers

Example
yes
Stringoptional
Limitlimit

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

Numberoptional
No parenthesisno_parenthesis

Separates entries by bullets, regardless of sub-sections.

Example
yes
Stringoptional
Alignalign

Which side of the page to align the ToC to. Allowed values are left, right, center

Suggested values
left center right
Example
align=left
Stringoptional
Clearclear

Align underneath floating images and tables or not. Allowed values are left, right, both, none

Suggested values
left right both none
Example
clear:both
Stringoptional
Linkslinks

Specify a list of links for the table of contents instead of the section links automatically generated by the TOC magic word

Example
* [[#Season 1|1]]
Stringoptional
The above documentation is transcluded from Template:Horizontal TOC/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Horizontal_TOC&oldid=18505"
Categories:
  • Templates using TemplateStyles
  • Wikipedia table of contents templates
Last edited on 20 July 2019, at 12:12

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 20 July 2019, at 12:12.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop