Template:Infobox Template/categories
This template renders information about another template, a variable list of categories, under which that template may categorize its articles. Depending on the amount of specified categories, this template may also categorize that template under the category that represents that amount. Noncategorizing, (normal) Categorizing or Multi-categorizing.
Parameters
- cat1: The name of the category the template may categorize under, with the value that it requires to do so, separated by exclamation mark (parameter allows duplicates with number; cat1, cat2, cat3, etc)
- nocat: Whether or not to suppress categorization under the automatically chosen category (defaults to false, which means auto categorization).
Note: the number-suffixed parameters must be specified in proper order, because the first empty/not specified one terminates the list.
Note: although this template does not limit the amount of possible cat# parameters, the parent infobox limits to thirty.
Note: if no cat# parameters are detected before the list is terminated, the default 'none' category will be used. These parameters always require a number, even if there is only one.
Syntax
{{Infobox Template/categories|cat1=value!value}}
Warning: this template will often force a table cell to split in two, so do not use it outside table cells! Infoboxes use tables, so in there would be fine.
Examples
Common use includes at least the cat1 parameter to specify the category a template may categorize under, with both category name and value specified:
{{Infobox Template/categories|cat1=Child characters!Child}}
You can also specify multiple categories for one template:
{{Infobox Template/categories|cat1=Child characters!Child|cat2=Adult characters!Adult}}
Additionally, it is possible to specify that a category is a maintenance task instead, by providing "maintenance" as the third value for any cat# parameter:
{{Infobox Template/categories |cat1=Magical characters!Magical |cat2=Nonmagical characters!Nonmagical |cat3=Characters of unknown magicality!''unknown''!maintenance }}
- Multiple: [list all]
- Magical [category]
- Nonmagical [category]
- unknown [maintenance]
You may leave the "categories" undefined by not specifying any cat# parameters (the category name specifically), or not maintaining proper ordering, so these all have the same result:
{{Infobox Template/categories}} {{Infobox Template/categories|cat1=}} {{Infobox Template/categories|cat=something!something}} {{Infobox Template/categories|cat1=!something}} {{Infobox Template/categories|cat1=|cat2=something!something}} {{Infobox Template/categories|cat1=something!something|cat1=}}
- none [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox Template/categories|cat1=Child characters!Child|nocat=true}}
This would render the same result as the first example above, but would not automatically categorize under Category:Categorizing templates.