Jump to content

Template:Horizontal ToC/doc

From Simple English Wikipedia, the free encyclopedia

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

Usage[change]

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

See also[change]

<templatedata> { "params": { "nonum": { "label": "No numbers", "description": "Hide the generated heading numbers", "example": "yes", "type": "string" }, "limit": { "label": "Limit", "description": "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", "type": "number" }, "no_parenthesis": { "label": "No parenthesis", "description": "Separates entries by bullets, regardless of sub-sections.", "example": "yes", "type": "string" }, "align": { "label": "Align", "description": "Which side of the page to align the ToC to. Allowed values are left, right, center", "example": "align=left", "type": "string", "suggestedvalues": [ "left", "center",

       		"right"

] }, "clear": { "label": "Clear", "description": "Align underneath floating images and tables or not. Allowed values are left, right, both, none", "example": "clear:both", "type": "string", "suggestedvalues": [ "left", "right",

       		"both",
       		"none"

] }, "links": { "label": "Links", "description": "Specify a list of links for the table of contents instead of the section links automatically generated by the TOC magic word", "example": "* 1", "type": "string" }

}, "description": "This template lays out the table of contents in a horizontal list rather than a vertical one.", "format": "inline" } </templatedata>