Template:TOC limit: Difference between revisions

The official GemStone IV encyclopedia.
Jump to navigation Jump to search
No edit summary
(add category)
 
(One intermediate revision by one other user 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
(as long as there are no =headings= on the page, which
there shouldn't be according to the MoS). */


<nowiki>{{TOC limit|4}}</nowiki>
.toclimit-2 .toclevel-2,

.toclimit-3 .toclevel-3,
4 allows for third-level headings, e.g. "1.1.1", but omits any subheadings below that from the TOC.
.toclimit-4 .toclevel-4,
[[Category:TOC templates|{{PAGENAME}}]]
.toclimit-5 .toclevel-5,
</noinclude>
.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.