Difference between revisions of "Template:TOC limit"

From blackwiki
Jump to navigation Jump to search
test>Amarkov
(tweaking to allow unnamed parameter)
test>Ais523
m (fixing parameter problem)
Line 1: Line 1:
<div {{#if:{{{1|{{{limit|}}}}}}|class="toclimit-{{{1}}}"}}>__TOC__</div><noinclude>
+
<div {{#if:{{{1|{{{limit|}}}}}}|class="toclimit-{{{1|{{{limit|}}}}}}"}}>__TOC__</div><noinclude>
 
==Usage==
 
==Usage==
 
{{tlp|TOClimit|2=limit=3}}
 
{{tlp|TOClimit|2=limit=3}}

Revision as of 17:43, 26 April 2007

Contents

Usage

{{TOClimit|limit=3}} This template inserts a Table of Contents which omits subheadings lower than a certain level. The table obeys the same layout rules as the __TOC__ magic word. You can specify the limit with the limit parameter; for instance, limit=3 allows ===subheadings=== but omits any subheadings below that from the TOC (they still have section edit links, however; the main use for this template is situations where you want section edit links for ease of editing but don't want to clutter the table of contents).