Template:Category handler/doc: Difference between revisions

Ganaram inukshuk (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
doc
Line 24: Line 24:


disables categories. Typical use as part of another template should instead use something like <code><nowiki>debug={{{debug|}}}</nowiki></code>, so that <code><nowiki>debug=1</nowiki></code> can be added to an instance of that template.
disables categories. Typical use as part of another template should instead use something like <code><nowiki>debug={{{debug|}}}</nowiki></code>, so that <code><nowiki>debug=1</nowiki></code> can be added to an instance of that template.
=== Category suppression ===
By default, this metatemplate allows categories within the following namespaces: main, file, mediawiki, template, category, and module. Templates placed those namespaces will not categorize those pages.
Additionally, this metatemplate suppresses categories if the page has the following suffixes (subpages): doc or sandbox. This prevents templates from categorizing test or documentation pages, but not if the /doc page is transcluded. This means categorizing templates that categorize other templates will the template's main page, but not their /doc subpages. However, if a categorizing template's documentation is demonstrating its own use, this isn't enough, so adding <code><nowiki>debug=1</nowiki></code> is required to keep categorizing templates from erroneously categorizing themselves.
This metatemplate is meant primarily for templates used within those namespaces. Use of this metatemplate is not required for templates with basic categorizing rules, or templates meant to be placed within other namespaces such as the user namespace.