Jump to content

Template:Automatic category TOC/core: Difference between revisions

From cernipedia
m Protected "Template:CatAutoTOC/core": High-risk template or module (more info) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
 
(17 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly>{{#ifexpr:{{{pagecount|0}}} > 1200
  # Using a sub-template, so that we never have have more than one call to the [[WP:EXPENSIVE]] function {{PAGESINCATEGORY}}
|{{Large category TOC
  #
  |Automatic category TOC = yes
  # TOC, depending on category size
  }}
  # < 100 pages = no TOC
  |{{#ifexpr:{{{pagecount|0}}} > 100
  # 100–1200 pages = {{Category TOC}}
  |{{Category TOC
  # > 1200 pages = {{Large category TOC}}
  |Automatic category TOC = yes
  -->{{#ifexpr: {{{pagecount}}} > 1200 <!--
  |align = {{#if:{{{align|}}}|{{{align}}}|left}}
    -->|<!--
  |top = {{#if:{{{top|}}}|{{{top}}}|yes}}
          # > 1200, so large TOC
  |numerals = {{#if:{{{numerals|}}}|{{{numerals}}}|group}}
        -->{{Large category TOC}}<!--
  |uppercase = {{#if:{{{uppercase|}}}|{{{uppercase}}}|yes}}
        -->[[Category:CatAutoTOC generates Large category TOC]]<!--
  |lowercase = {{#if:{{{lowercase|}}}|{{{lowercase}}}|no}}
    -->|<!--
  }}
          # < 1200, so check again
  |[[Category:Automatic category TOC generates no TOC]]
        -->{{#ifexpr: {{{pagecount}}} >= 100<!--
}}
            -->|<!--
}}{{clear}}</includeonly><noinclude>
                # >= 100, so std TOC
                -->{{Category TOC}}<!--
                -->[[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]]
</noinclude>
</noinclude>

Latest revision as of 13:25, 19 November 2026