<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cern.ch/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=120.89.104.0%2F24</id>
	<title>cernipedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cern.ch/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=120.89.104.0%2F24"/>
	<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php/Special:Contributions/120.89.104.0/24"/>
	<updated>2026-11-24T10:41:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.cern.ch/index.php?title=Template:Automatic_category_TOC/doc&amp;diff=19316</id>
		<title>Template:Automatic category TOC/doc</title>
		<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Template:Automatic_category_TOC/doc&amp;diff=19316"/>
		<updated>2025-09-24T08:18:21Z</updated>

		<summary type="html">&lt;p&gt;120.89.104.246: /* Tracking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
{{High-use}}&lt;br /&gt;
{{lua|Module:HTMLDecode}}&lt;br /&gt;
{{tsh|CatAutoTOC}}&lt;br /&gt;
Adds a Table of Contents (TOC) to a category page if the category&#039;s size warrants it.&lt;br /&gt;
&lt;br /&gt;
The size thresholds are:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;= 100 pages → no TOC&lt;br /&gt;
# 101–1200 pages → {{tl|Category TOC}}&lt;br /&gt;
# &amp;gt; 1200 pages → {{tl|Large category TOC}}&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&amp;lt;syntaxhighlight inline lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{Automatic category TOC}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On category pages, {{tl|Automatic category TOC}} can be placed wherever you want the TOC to be displayed.&lt;br /&gt;
&lt;br /&gt;
On a category header template, it is best placed outside any {{tag|includeonly}} tags, so that the template is categorised as using this template.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
No parameters are needed.&lt;br /&gt;
&lt;br /&gt;
However, the parameters available to {{tl|Category TOC}} may be supplied, and if {{t|Automatic category TOC}} calls {{tl|Category TOC}}, those parameters will be passed on to {{tl|Category TOC}}.&lt;br /&gt;
&lt;br /&gt;
So, for example, &amp;lt;syntaxhighlight inline lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{Automatic category TOC|align=center}}&amp;lt;/syntaxhighlight&amp;gt; will:&lt;br /&gt;
# Have no effect if no TOC is generated&lt;br /&gt;
# Align to the center if {{tl|Category TOC}} is used&lt;br /&gt;
# Have no effect if {{tl|Large category TOC}} is used, because {{tl|Large category TOC}} accepts no parameters&lt;br /&gt;
&lt;br /&gt;
== Tracking ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:right&amp;quot;&amp;gt;{{Automatic category TOC stats}}&amp;lt;/div&amp;gt;&lt;br /&gt;
Each page using this template is categorised in one of three tracking categories:&lt;br /&gt;
* {{clc|Automatic category TOC generates no TOC}}&lt;br /&gt;
* {{clc|Automatic category TOC generates standard Category TOC}}&lt;br /&gt;
* {{clc|Automatic category TOC generates Large category TOC}}&lt;br /&gt;
&lt;br /&gt;
Templates which big&lt;br /&gt;
{{tl|Automatic category TOC}} are categorised in&lt;br /&gt;
* {{clc|Templates using Automatic category TOC}}&lt;br /&gt;
&lt;br /&gt;
... but only if the transclusion is outside any {{tag|noinclude}} tags.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;{{Purge|&#039;&#039;Purge this page to update the totals&#039;&#039;}}&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
This template uses the [[Help:Magic words|magic word]] &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGESINCATEGORY}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to count the number of pages in the category.  Unfortunately, this function can return wildly erroneous results on some categories which have had many pages added and removed.&lt;br /&gt;
&lt;br /&gt;
This bug is well-known, and has been documented in several places since 2010, including:&lt;br /&gt;
* [[phab:T18036]]&lt;br /&gt;
* [[phab:T221795]]&lt;br /&gt;
* [[phab:T69196]]&lt;br /&gt;
&lt;br /&gt;
In the overwhelming majority of categories, the count is recorded accurately enough to support use of this template.  However, there seemed to be some issue with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGESINCATEGORY}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; falsely returning zero in some cases.  This is tracked in:&lt;br /&gt;
* {{clc|Automatic category TOC on pages where PAGESINCATEGORY returns zero}}&lt;br /&gt;
&lt;br /&gt;
As of 19 April 2020, that problem seems to have been fixed by a [[Special:Diff/950933704/951919806|small but cunning tweak]] to how &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGESINCATEGORY}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is called.&lt;br /&gt;
&lt;br /&gt;
The category &amp;lt;em&amp;gt;should&amp;lt;/em&amp;gt; contain only pages labelled as &amp;quot;empty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;{{Purge|&#039;&#039;Purge this page to update the totals&#039;&#039;}}&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Category TOC see also}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Category header templates]]&lt;br /&gt;
[[Category:Wikipedia category table of contents templates]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>120.89.104.246</name></author>
	</entry>
</feed>