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
- The name of the category that the template may categorize under, with the accompanying value, separated by exclamation mark (no parameter name, multiple parameters allowed, case sensitive)
- nocat: Whether or not to suppress categorization under the automatically chosen category (defaults to false, which means auto categorization).
Note: the unnamed parameters must be specified in proper order if using their positional numbers, because the first number that is empty/not specified terminates the list. If the list is empty this way, the default 'none' category will be used.
Note: although this template does not limit the amount of possible unnamed parameters, the parent infobox limits to thirty.
Syntax
{{Infobox Template/categories|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 one unnamed parameter to specify the category a template may categorize under, with the value that is required to select that category:
{{Infobox Template/categories|Child characters!Child}}
You can also specify multiple categories for one template:
{{Infobox Template/categories |Child characters!Child |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 unnamed parameter:
{{Infobox Template/categories |Magical characters!Magical |Nonmagical characters!Nonmagical |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 unnamed parameters (specifically the part left of the 1st separator), or not maintaining proper ordering, so these all have the same result:
{{Infobox Template/categories}} {{Infobox Template/categories|}} {{Infobox Template/categories|!something}} {{Infobox Template/categories|test=something!something}} {{Infobox Template/categories||something!something}} {{Infobox Template/categories|1=something!something|1=}} {{Infobox Template/categories|2=something!something}}
- none [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox Template/categories|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.