Anonymous user
Template:CatAutoTOC: Difference between revisions
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}}
(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:
# > 1200 pages = {{Large category TOC}}
-->{{Category other|<!--
#################################################################################
#### This is a category page, so generate a TOC if needed. ####
-->|<!--▼
####
#### Use a sub-template [[Template:CatAutoTOC/core]], so that we never have ####
#### more than one call to the [[WP:EXPENSIVE]] function {{PAGESINCATEGORY}} ####
-->[[Category:CatAutoTOC generates Large category TOC]]<!--▼
#################################################################################
-->|<!--▼
-->{{CatAutoTOC/core<!--
-->|<!--▼
-->}}<!--▼
-->}}<!--
-->{{Template other
-->{{#if: {{Str endswith|{{PAGENAME}}|/doc}}{{Str endswith|{{PAGENAME}}|/testcases}}{{Str endswith|{{PAGENAME}}|/sandbox}}<!--▼
#################################################################################
#### This page is a template, so categorise it ####
### Don't categorise /doc, /testcases or /sandbox pages▼
#### ####
### Not a /doc, /testcases or /sandbox page, so categorise it▼
#### ... unless it is a /doc, /testcases or /sandbox ####
▲ -->[[Category:Templates using CatAutoTOC]]<!--
#### ####
#### There is no point categorising every sub-page of the same template ####
#################################################################################
▲ -->{{#if: {{Str endswith|{{PAGENAME}}|/doc}}{{Str endswith|{{PAGENAME}}|/testcases}}{{Str endswith|{{PAGENAME}}|/sandbox}}<!--
-->}}</includeonly><noinclude>
{{Documentation}}
|