Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:TOC/doc: Difference between revisions

Template page
Arin Mara (talk | contribs)
Template works as intended, but the way it works is peculiar
m Update doc.
Line 10: Line 10:


; Parameters
; Parameters
:; limit
:; limit : Number indicating the highest heading level to show in the table of contents. The lower, the fewer heading levels are shown. Note that in articles, the main level for headings starts at 2 (the article title is H1). Valid values 2 till 6. Defaults to 2.
:: How many heading levels to show in the table of contents. The lower, the fewer headings are shown. Note that in articles, the main level for headings starts at 2 (the article title is H1, so limit=1 would generally show no headings at all).
:; align : Whether to align the table of contents to the "right" or "left". The default is left.
:; align
:: Whether to align the table of contents to the "right" or "left". The default is left.


; Sample  
; Sample  
:<code><nowiki>{{TOC|limit=2|align=right}}</nowiki></code>
:<code><nowiki>{{TOC|limit=2|align=right}}</nowiki></code>
::gives...
::gives...
{{TOC|limit=2|align=right}}
{{TOC|limit=3|align=right}}


== section 1 ==
== section 1 ==