Jump to content

Template:Automatic category TOC/core/sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
sync with main template, update per speedy names
m Removed protection from "Template:Automatic category TOC/core/sandbox": protection was due to a mistake; see request
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#ifexpr:{{{pagecount|0}}} > 1200
<includeonly><!--
|{{Large category TOC
# Using a sub-template, so that we never have have more than one call to the [[WP:EXPENSIVE]] function {{PAGESINCATEGORY}}
|CatAutoTOC = yes
#
|pagecount = {{{pagecount}}}
# TOC, depending on category size
}}[[Category:Automatic category TOC generates Large category TOC]]
# <= 100 pages → no TOC
|{{#ifexpr:{{{pagecount|0}}} > 100
# 101–1200 pages → {{Category TOC}}
|{{Category TOC
# > 1200 pages → {{Large category TOC}}
|pagecount={{{pagecount}}}

|CatAutoTOC=yes
###########################################################################
|align = {{#if:{{{align|}}}|{{{align}}}|left}}
# NOTE: The sort key {{PAGENAME}} is used on all the tracking categories #
|top = {{#if:{{{top|}}}|{{{top}}}|yes}}
# to override any {{DEFAULTSORT}} used in the category #
|numerals = {{#if:{{{numerals|}}}|{{{numerals}}}|group}}
###########################################################################
|uppercase = {{#if:{{{uppercase|}}}|{{{uppercase}}}|yes}}

|lowercase = {{#if:{{{lowercase|}}}|{{{lowercase}}}|no}}
-->{{#ifexpr: {{{pagecount}}} > 1200 <!--
}}[[Category:Automatic category TOC generates standard Category TOC]]
-->|<!--
|[[Category:Automatic category TOC generates no TOC]]
# > 1200, so large TOC
}}
-->{{Large category TOC<!--
}}{{#ifeq:{{{pagecount}}}|0
-->|CatAutoTOC=yes<!--
|[[Category:Automatic category TOC on pages where PAGESINCATEGORY returns zero]]
-->|pagecount={{{pagecount}}}<!--
}}{{clear}}<noinclude>
-->}}<!--
-->[[Category:Automatic category TOC generates Large category TOC|{{PAGENAME}}]]<!--
-->|<!--
# < 1200, so check again
-->{{#ifexpr: {{{pagecount}}} > 100<!--
-->|<!--
# > 100, so standard TOC
-->{{Category TOC<!--
-->|pagecount={{{pagecount}}}<!--
-->|CatAutoTOC=yes<!--
-->|align = {{{align|lef}t}}<!--
-->|top = {{{top|yes}}}<!--
-->|numerals = {{{numerals|group}}}<!--
-->|uppercase = {{{uppercase|yes}}}<!--
-->|lowercase = {{{lowercase|no}}}<!--
-->}}<!--
-->[[Category:Automatic category TOC generates standard Category TOC|{{PAGENAME}}]]<!--
-->|<!--
# <= 100, so no TOC
-->[[Category:Automatic category TOC generates no TOC|{{PAGENAME}}]]<!--
-->}}<!--
-->}}<!--
-->{{#ifeq: {{{pagecount}}} | 0 <!--
-->|[[Category:Automatic category TOC on pages where PAGESINCATEGORY returns zero|{{PAGENAME}}]]<!--
-->}}<!--
-->{{clear}}</includeonly><noinclude>
{{Documentation|Template:{{ROOTPAGENAME}}/doc}}
{{Documentation|Template:{{ROOTPAGENAME}}/doc}}
[[Category:Wikipedia Automatic category TOC]]
[[Category:Wikipedia Automatic category TOC]]

Latest revision as of 05:30, 12 May 2024