Difference between revisions of "Template:Horizontal TOC/doc"

From blackwiki
Jump to navigation Jump to search
(Wikipedia article has issues about the article in the internet was not working for me can please fix the issues and the article)
imported>Serols
m (Reverted edits by 2600:1003:B110:FB4C:A897:8357:7D1C:63A9 (talk) (HG) (3.4.8))
Line 1: Line 1:
Wikipedia is not working for the internet but it won’t let me do anything else
+
{{Documentation subpage}}
 +
<!-- Categories and interwikis go at the bottom of this page. -->
 +
{{Uses TemplateStyles|Template:TOC limit/styles.css|Template:Horizontal TOC/styles.css}}
 +
 
 +
This template lays out the table of contents in a [[WP:HLIST|horizontal list]] rather than a vertical one.
  
 
== Usage ==
 
== Usage ==

Revision as of 10:39, 12 July 2019

Script error: No such module "Uses TemplateStyles".

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 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.

For example,

{{horizontal TOC}}

produces:

See also


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
Alignalign

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

Example
align=left
Stringoptional
Clearclear

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

Example
clear:both
Stringoptional