Template:TOC limit: Difference between revisions
Jump to navigation
Jump to search
GS4-SCRIBES (talk | contribs) No edit summary |
(add category) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<div class="toclimit-{{{1|{{{limit|3}}}}}}">__TOC__</div> |
<includeonly><div class="toclimit-{{{1|{{{limit|3}}}}}}">__TOC__</div></includeonly><noinclude> |
||
==Usage== |
|||
<nowiki>{{TOC limit}}</nowiki> |
|||
The template defaults to including only the first- and second-level headings, e.g. those numbered "1" and "1.1" in the TOC. |
|||
/* Allow limiting of which header levels are shown in a TOC; |
|||
You can specify a different limit by adding a header level: |
|||
<div class="toclimit-3">, for instance, will limit to |
|||
showing ==headings== and ===headings=== but no further |
|||
<nowiki>{{TOC limit|4}}</nowiki> |
|||
(as long as there are no =headings= on the page, which |
|||
there shouldn't be according to the MoS). |
|||
4 allows for third-level headings, e.g. "1.1.1", but omits any subheadings below that from the TOC. |
|||
*/ |
|||
[[Category:TOC templates|{{PAGENAME}}]] |
|||
.toclimit-2 .toclevel-2, |
|||
</noinclude> |
|||
.toclimit-3 .toclevel-3, |
|||
.toclimit-4 .toclevel-4, |
|||
.toclimit-5 .toclevel-5, |
|||
.toclimit-6 .toclevel-6, |
|||
.toclimit-7 .toclevel-7 { display: none; } |
Latest revision as of 11:37, 4 June 2016
Usage
{{TOC limit}}
The template defaults to including only the first- and second-level headings, e.g. those numbered "1" and "1.1" in the TOC. You can specify a different limit by adding a header level:
{{TOC limit|4}}
4 allows for third-level headings, e.g. "1.1.1", but omits any subheadings below that from the TOC.