Template:Infobox Template/singletag
Infobox Template/singletag | |
---|---|
Purpose |
Infobox [list all] |
Single tag |
No [list all] |
Multi-line |
No [list all] |
Protected |
No [list all] |
Game related |
No [list all] |
Categorization | |
Suppressible |
Recursively [list all] |
Choice |
Single category [list all] |
Categories |
Multiple: [list all] |
|
|
Variables | |
Names |
none [list all] |
Subpages |
This template offers the choice to specify whether another template can be called without (optional) parameters. It can also automatically categorize the page of that template under the category for that kind of template.
Parameters
- Whether the template can be called without parameters (no parameter name and value is case insensitive):
- no
- optional
- yes
- any other (non)empty value defaults to: unspecified
- nocat: Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).
Note: eventhough the name of this template implies a default value of "yes", leaving the value empty or out resolves to "unspecified" instead.
Syntax
{{Infobox Template/singletag|value}}
Examples
Common use includes the unnamed parameter with either values "yes" or "no", or the occasional "optional":
{{Infobox Template/singletag|yes}} {{Infobox Template/singletag|no}} {{Infobox Template/singletag|optional}}
The case of the value is not important:
{{Infobox Template/singletag|YES}}
- Yes [list all]
You may leave "singletag" undefined (which would raise the Templates with unspecified parameters maintenance task) by not specifying any valid value, so these all have the same result:
{{Infobox Template/singletag}} {{Infobox Template/singletag|}} {{Infobox Template/singletag|yeah}} {{Infobox Template/singletag|true}} {{Infobox Template/singletag|aye, it's not engaged!}} {{Infobox Template/singletag|whatever}} {{Infobox Template/singletag|nope?}} {{Infobox Template/singletag|false}} {{Infobox Template/singletag|null}} {{Infobox Template/singletag|zero}} {{Infobox Template/singletag|multiple}} {{Infobox Template/singletag|not}}
- unspecified [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox Template/singletag|yes|nocat=true}}
This would render the same result as the first example above, but would not automatically categorize under Category:Templates without parameters. This feature works both on valid values and the maintenance task mentioned above.