Template:Categorize
From HorizonXI Wiki
Usage
- First unnamed parameter: set to nc, no cat or no categories to force the template to do nothing. ndnc or ncnd will also work, intended with Template:Preview Only Infobox to disable categorization and documentation at the same time.
- Second unnamed parameter: put whatever is supposed to happen if the first parameter is not set to one of the above.
- Note: The template will also do nothing if the page has a namespace other than the main namespace or the namespace "Category". E.g. in the namespace "Template" it will do nothing.
The actual usage of the template is intended for categorization, as the name suggests. It allows to control categorization in other templates by forwarding the first unnamed parameter.
Example:
If a template "NPC" contains the line
{{categorize|{{{1|}}}|[[Category:NPC]]}}
Then a call like
{{NPC|nc ... }}
will put the nc into the categorize template and cause it to do nothing.
A call like
{{NPC ... }}
without specifying the first unnamed parameter in a way that Template:categorize processes it will make Template:categorize do whatever is in its second unnamed argument. In this example, this is apply [[Category:NPC]].
Designing templates in this way allows to control categorization at template call, e.g. for use on example pages.