Template:TOC: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m 1 revision imported
No edit summary
 
Line 23:
Section headings create a hierarchy. In this page's table of contents, note how Section 2, "Modifying the Table of Contents", contains several subsections. These subsections could also contain subsections of their own.
 
It's possible to limit the depth of headings which are included in the table using the <nowiki>{{toclimittoc}}</nowiki> template. By setting a number value for <code>|limit=</code>, only headings of the specified level or greater will display. For example, <code><nowiki>{{toclimittoc|limit=2}}</nowiki></code> will include only level two headings (<nowiki>==Heading==</nowiki>), while <code><nowiki>{{toclimittoc|limit=3}}</nowiki></code> will include level three headings (<nowiki>===Heading===</nowiki>) as well as level two headings, and so on.
 
LikeWhen using the other TOC templates, <nowiki>{{toclimittoc}}</nowiki> will causetemplate, the tableTOC towill appear wherever the template is placed on the page. Additionally, both <nowiki>{{tocleft}}</nowiki> and <nowiki>{{tocright}}</nowiki> support the use of the <code>|limit</code> variable.
</noinclude>