Difference between revisions of "Template:Infobox Item/range"

From Twinsuniverse
Jump to: navigation, search
(Created page with "<includeonly> {{#switch: {{lc:{{{1|}}}}} | none = {{categorizer|category=Nonranged items|display=emptyinfobox|nocat={{{nocat|false}}}}} | short = {{categorizer|category=Short ...")
 
(added infobox)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
 
{{#switch: {{lc:{{{1|}}}}}
 
{{#switch: {{lc:{{{1|}}}}}
| none = {{categorizer|category=Nonranged items|display=emptyinfobox|nocat={{{nocat|false}}}}}
+
| none = {{categorizer|category=Nonranged items|display=none|nocat={{{nocat|false}}}}}
| short = {{categorizer|category=Short ranged items|label=Short|display=infobox|nocat={{{nocat|false}}}}}
+
| short = {{categorizer|category=Short ranged items|label=Short|nocat={{{nocat|false}}}}}
| medium = {{categorizer|category=Medium ranged items|label=Medium|display=infobox|nocat={{{nocat|false}}}}}
+
| medium = {{categorizer|category=Medium ranged items|label=Medium|nocat={{{nocat|false}}}}}
| long = {{categorizer|category=Long ranged items|label=Long|display=infobox|nocat={{{nocat|false}}}}}
+
| long = {{categorizer|category=Long ranged items|label=Long|nocat={{{nocat|false}}}}}
| infinite = {{categorizer|category=Infinite ranged items|label=Infinite|display=infobox|nocat={{{nocat|false}}}}}
+
| infinite = {{categorizer|category=Infinite ranged items|label=Infinite|nocat={{{nocat|false}}}}}
| varies magic = {{categorizer|category=Varied ranged items|label=Varies|display=infobox|nocat={{{nocat|false}}}}} (depends on magic)
+
| varies magic = {{categorizer|category=Varied ranged items|label=Varies|nocat={{{nocat|false}}}}} (depends on magic)
| varies behavior = {{categorizer|category=Varied ranged items|label=Varies|display=infobox|nocat={{{nocat|false}}}}} (depends on bahavior)
+
| varies behavior = {{categorizer|category=Varied ranged items|label=Varies|nocat={{{nocat|false}}}}} (depends on bahavior)
 
| {{maintenance task|nocat={{{nocat|false}}}
 
| {{maintenance task|nocat={{{nocat|false}}}
 
     |category=Items of unknown range
 
     |category=Items of unknown range
Line 13: Line 13:
 
     |label=''unknown''
 
     |label=''unknown''
 
     |reason=The '''range''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }}
 
     |reason=The '''range''' 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=Nonranged items!none
 +
|cat2=Short ranged items!short
 +
|cat3=Medium ranged items!medium
 +
|cat4=Long ranged items!long
 +
|cat5=Infinite ranged items!infinite
 +
|cat6=Varied ranged items!varies magic/behavior
 +
|cat7=Items of unknown range!''unknown''!maintenance
 +
|var1=
 +
}}
 +
 
 
This template offers a multiple choice for defining the range category of an (item) article. It can also automatically categorize a page under that category.
 
This template offers a multiple choice for defining the range category of an (item) article. It can also automatically categorize a page under that category.
  
Line 79: Line 95:
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Short ranged 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:Short ranged items]]. This feature works both on valid values and the maintenance task mentioned above.
  
[[Category:Categorizers|item]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:19, 6 June 2014

Infobox Item/range
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 range category of an (item) article. It can also automatically categorize a page under that category.

Parameters

  1. The selected range from the following values (no parameter name and values are case insensitive):
    • short
    • medium
    • long
    • infinite
    • 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/range|value}}

Examples

Any of the above values may be used like this:

{{Infobox Item/range|short}}
{{Infobox Item/range|medium}}
{{Infobox Item/range|long}}
{{Infobox Item/range|infinite}}
{{Infobox Item/range|varies magic}}
{{Infobox Item/range|varies behavior}}
Short [list all]
Medium [list all]
Long [list all]
Infinite [list all]
Varies [list all] (depends on magic)
Varies [list all] (depends on behavior)


The case of the value is not important:

{{Infobox Item/range|MEDium}}
Medium [list all]


You don't have to specify "range" for items that don't attack, by specifying the "none" value, so this won't display anything:

{{Infobox Item/range|none}}

Instead, this would still categorize the page under the Nonranged items category, inline with the other values above.


You may also leave the "range" undefined (which would raise the Items of unknown range maintenance task) by not specifying any valid value, so these all have the same result:

{{Infobox Item/range}}
{{Infobox Item/range|}}
{{Infobox Item/range|close}}
{{Infobox Item/range|wide}}
{{Infobox Item/range|3 parcels}}
{{Infobox Item/range|yes it's ranged}}
unknown [list all]


The nocat parameter may be used to suppress automatic categorization like this (any value will do):

{{Infobox Item/range|short|nocat=true}}

This would render the same result as the first example above, but would not automatically categorize under Category:Short ranged items. This feature works both on valid values and the maintenance task mentioned above.