Jump to content

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

From Wikipedia, the free encyclopedia
Content deleted Content added
m Removed protection from "Template:Automatic category TOC/core/sandbox": protection was due to a mistake; see request
 
(7 intermediate revisions by 4 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
# 100–1200 pages = {{Category TOC}}
|{{Category TOC
# > 1200 pages = {{Large category TOC}}
-->{{#ifexpr: {{{pagecount}}} > 1200 <!--
|pagecount={{{pagecount}}}
|CatAutoTOC=yes
-->|<!--
|align = {{#if:{{{align|}}}|{{{align}}}|left}}
# > 1200, so large TOC
|top = {{#if:{{{top|}}}|{{{top}}}|yes}}
-->{{Large category TOC}}<!--
|numerals = {{#if:{{{numerals|}}}|{{{numerals}}}|group}}
-->[[Category:CatAutoTOC generates Large category TOC]]<!--
|uppercase = {{#if:{{{uppercase|}}}|{{{uppercase}}}|yes}}
-->|<!--
|lowercase = {{#if:{{{lowercase|}}}|{{{lowercase}}}|no}}
# < 1200, so check again
}}[[Category:Automatic category TOC generates standard Category TOC]]
-->{{#ifexpr: {{{pagecount}}} >= 100<!--
|[[Category:Automatic category TOC generates no TOC]]
-->|<!--
}}
# >= 100, so std TOC
}}{{#ifeq:{{{pagecount}}}|0
-->{{Category TOC<!--
|[[Category:Automatic category TOC on pages where PAGESINCATEGORY returns zero]]
-->|align = {{#if: {{{align|}}} | {{{align}}} |left}}<!--
}}{{clear}}<noinclude>
-->|top = {{#if: {{{top|}}} | {{{top}}} |yes}}<!--
-->|numerals = {{#if: {{{numerals|}}} | {{{numerals}}} |group}}<!--
-->|uppercase = {{#if: {{{uppercase|}}} | {{{uppercase}}} |yes}}<!--
-->|lowercase = {{#if: {{{lowercase|}}} | {{{lowercase}}} |no}}<!--
-->}}<!--
-->[[Category:CatAutoTOC generates standard Category TOC]]<!--
-->|<!--
# < 100, so no TOC
-->[[Category:CatAutoTOC generates no TOC]]<!--
-->}}<!--
-->}}<!--
--></includeonly><noinclude>
{{Documentation|Template:{{ROOTPAGENAME}}/doc}}
{{Documentation|Template:{{ROOTPAGENAME}}/doc}}
[[Category:Wikipedia CatAutoTOC]]
[[Category:Wikipedia Automatic category TOC]]
</noinclude>
</noinclude>

Latest revision as of 05:30, 12 May 2024