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

From Summertime Saga Wiki
Jump to: navigation, search
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This template lays out the table of contents in a horizontal list rather than a vertical one.
+
The template {{tlg|horizontal TOC}} lays out the table of contents in a horizontal list rather than a vertical one.
  
 
== Usage ==
 
== Usage ==
  
: {{tlc|horizontal TOC}}
+
: {{tlg|code=yes|nolink=yes|horizontal TOC}}
  
 
There is no need to specify {{code|__NOTOC__}}: this template handles that automatically.
 
There is no need to specify {{code|__NOTOC__}}: this template handles that automatically.
  
* Use {{tlc|horizontal TOC|nonum{{=}}yes}} to hide the generated heading numbers.
+
* Use {{tlg|code=yes|nolink=yes|horizontal TOC|nonum{{=}}yes}} to hide the generated heading numbers.
* Use {{tlc|horizontal TOC|limit{{=}}2}} to limit the depth of the generated headings to the first headings only.
+
* Use {{tlg|code=yes|nolink=yes|horizontal TOC|limit{{=}}2}} to limit the depth of the generated headings to the first headings only.
* Use {{tlc|horizontal TOC|align{{=}}center}} to float the table of contents to the center of the page.
+
* Use {{tlg|code=yes|nolink=yes|horizontal TOC|align{{=}}center}} to float the table of contents to the center of the page.
  
For example, {{tlc|horizontal TOC}} produces: {{horizontal TOC}}
+
For example, {{tlg|code=yes|nolink=yes|horizontal TOC}} produces: {{horizontal TOC}}
  
 
== Parameters ==
 
== Parameters ==
  
 
; {{para|nonum|{{var|yes}}}} : Hide the generated heading numbers.
 
; {{para|nonum|{{var|yes}}}} : Hide the generated heading numbers.
 
+
; {{para|limit}} : Limits the depth of subheadings shown. For instance, using {{para|limit|4}} will hide the fourth level and deeper subheadings in the hierarchy. And {{para|limit|2}} will hide all subheadings leaving only the main headings. This works by hiding the lower levels with CSS.
; {{para|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.
 
 
 
 
; {{para|align}} : Which side of the page to align the table of content to. Allowed values are left, right, center.
 
; {{para|align}} : Which side of the page to align the table of content to. Allowed values are left, right, center.
 
 
; {{para|clear}} : Align underneath floating images and tables or not. Allowed values are left, right, both, none.
 
; {{para|clear}} : Align underneath floating images and tables or not. Allowed values are left, right, both, none.
  
[[Category:Templates]]
+
[[Category:Templates]][[Category:Table of contents templates]][[Category:Templates documentation]]
[[Category:Templates documentation]]
 

Latest revision as of 18:40, 21 July 2020

The template {{horizontal TOC}} 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.

  • Use {{horizontal TOC|nonum=yes}} to hide the generated heading numbers.
  • Use {{horizontal TOC|limit=2}} to limit the depth of the generated headings to the first headings only.
  • Use {{horizontal TOC|align=center}} to float the table of contents to the center of the page.

For example, {{horizontal TOC}} produces:

Parameters

|nonum=yes 
Hide the generated heading numbers.
|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.
|align= 
Which side of the page to align the table of content to. Allowed values are left, right, center.
|clear= 
Align underneath floating images and tables or not. Allowed values are left, right, both, none.