Template:Cmbox and Template:CatAutoTOC/core: Difference between pages

From Polyphasic Sleep Wiki
(Difference between pages)
m 1 revision imported
 
Undid revision 981209527 by Jonesey95 (talk). Maybe this? My last experiment.
 
Line 1: Line 1:
{{#invoke:Message box|cmbox}}<noinclude>
<includeonly><!--
{{documentation}}
  # Using a sub-template, so that we never have have more than one call to the [[WP:EXPENSIVE]] function {{PAGESINCATEGORY}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
  #
  # TOC, depending on category size
  # <= 100 pages → no TOC
  # 101–1200 pages → {{Category TOC}}
  # > 1200 pages → {{Large category TOC}}
 
###########################################################################
# NOTE: The sort key {{PAGENAME}} is used on all the tracking categories  #
#      to override any {{DEFAULTSORT}} used in the category              #
###########################################################################
 
-->{{#ifexpr: {{{pagecount}}} > 1200 <!--
    -->|<!--
          # > 1200, so large TOC
        -->{{Large category TOC<!--
            -->|CatAutoTOC=yes<!--
            -->|pagecount={{{pagecount}}}<!--
        -->}}<!--
        -->[[Category:CatAutoTOC generates Large category TOC|{{PAGENAME}}]]<!--
    -->|<!--
          # < 1200, so check again
        -->{{#ifexpr: {{{pagecount}}} > 100<!--
            -->|<!--
                # > 100, so std TOC
                -->{{Category TOC<!--
                    -->|pagecount={{{pagecount}}}<!--
                    -->|CatAutoTOC=yes<!--
                    -->|align    = {{#if: {{{align|}}} | {{{align}}} |left}}<!--
                    -->|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|{{PAGENAME}}]]<!--
            -->|<!--
                # <= 100, so no TOC
                -->[[Category:CatAutoTOC generates no TOC|{{PAGENAME}}]]<!--
        -->}}<!--
-->}}<!--
-->{{#ifeq: {{{pagecount}}} | 0 <!--
    -->|[[Category:CatAutoTOC on pages where PAGESINCATEGORY returns zero|{{PAGENAME}}]]<!--
-->}}<!--
-->{{clear}}</includeonly><noinclude>
{{Documentation|Template:{{ROOTPAGENAME}}/doc}}
[[Category:Wikipedia CatAutoTOC]]
</noinclude>
</noinclude>

Revision as of 23:01, 30 September 2020