Template:CatAutoTOC: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Don't categorise /doc, /testcases or /sandbox pages) |
(As tested in Template:CatAutoTOC/sandbox: use a sub-template Template:CatAutoTOC/core, so that we never have more than one call to the WP:EXPENSIVE function {{PAGESINCATEGORY}}) |
||
Line 5: | Line 5: | ||
# > 1200 pages = {{Large category TOC}} |
# > 1200 pages = {{Large category TOC}} |
||
-->{{Category other|<!-- |
-->{{Category other|<!-- |
||
################################################################################# |
|||
-->{{#ifexpr: {{PAGESINCATEGORY|{{PAGENAME}}|R}} > 1200 <!-- |
|||
#### This is a category page, so generate a TOC if needed. #### |
|||
⚫ | |||
#### #### |
|||
#### Use a sub-template [[Template:CatAutoTOC/core]], so that we never have #### |
|||
-->{{Large category TOC}}<!-- |
|||
#### more than one call to the [[WP:EXPENSIVE]] function {{PAGESINCATEGORY}} #### |
|||
⚫ | |||
################################################################################# |
|||
⚫ | |||
-->{{CatAutoTOC/core<!-- |
|||
# < 1200, so check again |
|||
-->|pagecount={{PAGESINCATEGORY|{{PAGENAME}}|R}}<!-- |
|||
-->}}<!-- |
|||
# > 100, so std TOC |
|||
-->{{Category TOC}}<!-- |
|||
-->[[Category:CatAutoTOC generates standard Category TOC]]<!-- |
|||
⚫ | |||
# < 100, so no TOC |
|||
-->[[Category:CatAutoTOC generates no TOC]]<!-- |
|||
⚫ | |||
-->}}<!-- |
|||
-->}}<!-- |
-->}}<!-- |
||
-->{{Template other |
-->{{Template other<!-- |
||
⚫ | |||
⚫ | |||
################################################################################# |
|||
-->|<!-- |
|||
#### This page is a template, so categorise it #### |
|||
⚫ | |||
⚫ | |||
-->|<!-- |
|||
#### #### |
|||
⚫ | |||
#### ... unless it is a /doc, /testcases or /sandbox #### |
|||
⚫ | |||
#### #### |
|||
-->}}<!-- |
|||
#### There is no point categorising every sub-page of the same template #### |
|||
################################################################################# |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
-->}}</includeonly><noinclude> |
-->}}</includeonly><noinclude> |
||
{{Documentation}} |
{{Documentation}} |