Difference between revisions of "Template:Infobox Item/rate"
J McKalling (Talk | contribs) m |
J McKalling (Talk | contribs) m (eliminated the display parameter of the categorizer) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#switch: {{lc:{{{1|}}}}} | {{#switch: {{lc:{{{1|}}}}} | ||
− | | low = {{categorizer|category=Low rate items|label=Low | + | | low = {{categorizer|category=Low rate items|label=Low|nocat={{{nocat|false}}}}} |
− | | medium = {{categorizer|category=Medium rate items|label=Medium | + | | medium = {{categorizer|category=Medium rate items|label=Medium|nocat={{{nocat|false}}}}} |
− | | high = {{categorizer|category=High rate items|label=High | + | | high = {{categorizer|category=High rate items|label=High|nocat={{{nocat|false}}}}} |
− | | varies magic = {{categorizer|category=Varied rate items|label=Varies | + | | varies magic = {{categorizer|category=Varied rate items|label=Varies|nocat={{{nocat|false}}}}} (depends on magic) |
− | | varies behavior = {{categorizer|category=Varied rate items|label=Varies | + | | varies behavior = {{categorizer|category=Varied rate items|label=Varies|nocat={{{nocat|false}}}}} (depends on bahavior) |
− | | none = {{categorizer|category=Nonrated items|display= | + | | none = {{categorizer|category=Nonrated items|display=none|nocat={{{nocat|false}}}}} |
| {{maintenance task|nocat={{{nocat|false}}} | | {{maintenance task|nocat={{{nocat|false}}} | ||
|category=Items of unknown rate | |category=Items of unknown rate |
Revision as of 17:50, 3 January 2013
This template offers a multiple choice for defining the rate category of an (item) article. It can also automatically categorize a page under that category.
Parameters
- The selected rate from the following values (no parameter name and values are case insensitive):
- low
- medium
- high
- varies magic
- varies behavior
- none
- any other (non)empty value defaults to: unknown
- nocat: Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).
Note: more category values should be discussed on the discussion page.
Syntax
{{Infobox Item/rate|value}}
Examples
Any of the above values may be used like this:
{{Infobox Item/rate|low}} {{Infobox Item/rate|medium}} {{Infobox Item/rate|high}} {{Infobox Item/rate|varies magic}} {{Infobox Item/rate|varies behavior}}
- Low [list all]
- Medium [list all]
- High [list all]
- Varies [list all] (depends on magic)
- Varies [list all] (depends on behavior)
The case of the value is not important:
{{Infobox Item/rate|MEDium}}
- Medium [list all]
You don't have to specify "rate" for items that don't attack, by specifying the "none" value, so this won't display anything:
{{Infobox Item/rate|none}}
Instead, this would still categorize the page under the Nonrated items category, inline with the other values above.
You may also leave the "rate" undefined (which would raise the Items of unknown rate maintenance task) by not specifying any valid value, so these all have the same result:
{{Infobox Item/rate}} {{Infobox Item/rate|}} {{Infobox Item/rate|Lsnake}} {{Infobox Item/rate|2 stars}} {{Infobox Item/rate|railgun-fast}}
- unknown [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox Item/rate|low|nocat=true}}
This would render the same result as the first example above, but would not automatically categorize under Category:Low rate items. This feature works both on valid values and the maintenance task mentioned above.