Difference between revisions of "Template:Infobox Item/damage"
J McKalling (Talk | contribs) m (eliminated the display parameter of the categorizer) |
J McKalling (Talk | contribs) (added infobox) |
||
Line 12: | Line 12: | ||
|label=''unknown'' | |label=''unknown'' | ||
|reason=The '''damage''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }} | |reason=The '''damage''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }} | ||
− | }}</includeonly><noinclude> | + | }}</includeonly><noinclude>{{Infobox Template |
+ | |purpose=infobox | ||
+ | |singletag=no | ||
+ | |multiline=no | ||
+ | |gamerelated=yes | ||
+ | |suppressible=recursively | ||
+ | |choice=single | ||
+ | |cat1=Nondamaging items!none | ||
+ | |cat2=Weak items!little | ||
+ | |cat3=Medium damage items!medium | ||
+ | |cat4=Strong items!high | ||
+ | |cat5=Varied damage items!varies magic/behavior | ||
+ | |cat6=Items of unknown damage!''unknown''!maintenance | ||
+ | |var1= | ||
+ | }} | ||
+ | |||
This template offers a multiple choice for defining the damage category of an (item) article. It can also automatically categorize a page under that category. | This template offers a multiple choice for defining the damage category of an (item) article. It can also automatically categorize a page under that category. | ||
Line 74: | Line 89: | ||
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Weak items]]. This feature works both on valid values and the maintenance task mentioned above. | This would render the same result as the first example above, but would not automatically categorize under [[:Category:Weak items]]. This feature works both on valid values and the maintenance task mentioned above. | ||
− | |||
</noinclude> | </noinclude> |
Latest revision as of 17:19, 6 June 2014
Infobox Item/damage | |
---|---|
Purpose |
Infobox [list all] |
Single tag |
No [list all] |
Multi-line |
No [list all] |
Protected |
No [list all] |
Game related |
Yes [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 a multiple choice for defining the damage category of an (item) article. It can also automatically categorize a page under that category.
Parameters
- The selected damage from the following values (no parameter name and values are case insensitive):
- little
- 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/damage|value}}
Examples
Any of the above values may be used like this:
{{Infobox Item/damage|little}} {{Infobox Item/damage|medium}} {{Infobox Item/damage|high}} {{Infobox Item/damage|varies magic}} {{Infobox Item/damage|varies behavior}}
- Little [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/damage|MEDium}}
- Medium [list all]
You don't have to specify "damage" for items that don't attack, by specifying the "none" value, so this won't display anything:
{{Infobox Item/damage|none}}
Instead, this would still categorize the page under the Nondamaging items category, inline with the other values above.
You may also leave the "damage" undefined (which would raise the Items of unknown damage maintenance task) by not specifying any valid value, so these all have the same result:
{{Infobox Item/damage}} {{Infobox Item/damage|}} {{Infobox Item/damage|totalloss}} {{Infobox Item/damage|2 stars}} {{Infobox Item/damage|yes}}
- unknown [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox Item/damage|little|nocat=true}}
This would render the same result as the first example above, but would not automatically categorize under Category:Weak items. This feature works both on valid values and the maintenance task mentioned above.