<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://www.mansun.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3ATOC_limit%2Fdoc</id>
		<title>Template:TOC limit/doc - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.mansun.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3ATOC_limit%2Fdoc"/>
		<link rel="alternate" type="text/html" href="http://www.mansun.wiki/index.php?title=Template:TOC_limit/doc&amp;action=history"/>
		<updated>2026-04-29T19:39:45Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://www.mansun.wiki/index.php?title=Template:TOC_limit/doc&amp;diff=2060&amp;oldid=prev</id>
		<title>DarkMavis: Created page with &quot;{{Documentation subpage}} &lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&gt;  This template inserts a Table of Contents which omits subheadings beyond a...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.mansun.wiki/index.php?title=Template:TOC_limit/doc&amp;diff=2060&amp;oldid=prev"/>
				<updated>2015-07-15T19:49:06Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} &amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;  This template inserts a Table of Contents which omits subheadings beyond a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template inserts a Table of Contents which omits subheadings beyond a certain depth. The table obeys the same layout rules as the &amp;lt;nowiki&amp;gt;__TOC__&amp;lt;/nowiki&amp;gt; [[WP:MAGIC|magic word]]. Omitted sections still have section edit links in the article body; 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.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{{TOC limit}}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The template defaults to including only the first- and second-level headings, e.g. those numbered &amp;quot;1&amp;quot; and &amp;quot;1.1&amp;quot; in the TOC.&lt;br /&gt;
&lt;br /&gt;
You can specify a different limit by adding a header level:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{{TOC limit|4}}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 allows for third-level headings, e.g. &amp;quot;1.1.1&amp;quot;, but omits any subheadings below that from the TOC.&lt;br /&gt;
&lt;br /&gt;
The template works by hiding the lower levels with CSS. See [[MediaWiki:Common.css]].&lt;br /&gt;
&lt;br /&gt;
A suggested alternative is {{tl|TOC hidden}}.&lt;br /&gt;
&lt;br /&gt;
=== TOC levels versus wikitext header levels ===&lt;br /&gt;
The heading levels in the TOC normally correspond to the header levels in the wikitext, so a &amp;quot;== Level-2 header ==&amp;quot; will normally generate the first-level (&amp;quot;1&amp;quot;) TOC headings, a &amp;quot;=== Level-3 header ===&amp;quot; will normally generate the second-level (&amp;quot;1.1&amp;quot;) TOC headings, and so on. This correspondence does ''not'' hold if the page contains &amp;quot;= Level-1 headers =&amp;quot; or skips header levels. For example, wikitext like this:&lt;br /&gt;
 == Level-2 heading (A) ==&lt;br /&gt;
 === Level-3 heading (B) ===&lt;br /&gt;
 == Level-2 heading (C) ==&lt;br /&gt;
 ====== Level-6 heading (D) ======&lt;br /&gt;
 = Level-1 heading (E) =&lt;br /&gt;
 == Level-2 heading (F) ==&lt;br /&gt;
 === Level-3 heading (G) ===&lt;br /&gt;
will generate a TOC like this:&lt;br /&gt;
{| class=&amp;quot;toc&amp;quot;&lt;br /&gt;
|&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Contents&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;toclevel-1 tocsection-1&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;tocnumber&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;toctext&amp;quot;&amp;gt;Level-2 heading (A)&amp;lt;/span&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;toclevel-2 tocsection-2&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;tocnumber&amp;quot;&amp;gt;1.1&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;toctext&amp;quot;&amp;gt;Level-3 heading (B)&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;toclevel-1 tocsection-1&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;tocnumber&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;toctext&amp;quot;&amp;gt;Level-2 heading (C)&amp;lt;/span&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;toclevel-2 tocsection-2&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;tocnumber&amp;quot;&amp;gt;2.1&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;toctext&amp;quot;&amp;gt;Level-6 heading (D)&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;toclevel-1 tocsection-1&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;tocnumber&amp;quot;&amp;gt;3&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;toctext&amp;quot;&amp;gt;Level-1 heading (E)&amp;lt;/span&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;toclevel-2 tocsection-2&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;tocnumber&amp;quot;&amp;gt;3.1&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;toctext&amp;quot;&amp;gt;Level-2 heading (F)&amp;lt;/span&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;toclevel-3 tocsection-3&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;tocnumber&amp;quot;&amp;gt;3.1.1&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;toctext&amp;quot;&amp;gt;Level-3 heading (G)&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Using &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{{TOC limit}}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; on this page ''would not'' hide header D, because even though it is a level-6 heading it is shown at the second level in the TOC. And it ''would'' hide header G even though it is a level-3 heading just like header B, because header G is shown at the third level in the TOC while header B is shown at the second level.&lt;br /&gt;
&lt;br /&gt;
=== Conflicts ===&lt;br /&gt;
This template does not interact well with the {{tl|TOC right}}, {{tl|TOC left}}, {{tl|TOC center}} templates.  To achieve the correct effect, use those with a limit parameter.  For example, {{tlx|TOC&amp;amp;nbsp;right|2=limit=2}} has the effect that {{tlx|TOC&amp;amp;nbsp;right}} and {{tlx|TOC&amp;amp;nbsp;limit|2}} would have—if they worked together.&lt;br /&gt;
&lt;br /&gt;
Due to the way the TOC is generated with MobileFrontend (mobile/tablet view) this template does not currently affect how the mobile TOC is displayed.&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- ADD CATEGORIES BELOW THIS LINE --&amp;gt;&lt;br /&gt;
[[Category:Wikipedia table of contents templates|{{PAGENAME}}]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ADD INTERWIKIS BELOW THIS LINE --&amp;gt;&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>DarkMavis</name></author>	</entry>

	</feed>