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

From Twinsuniverse
Jump to: navigation, search
(Created page with "<includeonly> {{#switch: {{lc:{{{row|}}}}} | 1 = {{categorizer|category=Row 1 items|label=Row 1|display=infobox|nocat={{{nocat|false}}}}} | 2 = {{categorizer|category=Row 2 it...")
 
(added infobox)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
 
{{#switch: {{lc:{{{row|}}}}}
 
{{#switch: {{lc:{{{row|}}}}}
| 1 = {{categorizer|category=Row 1 items|label=Row 1|display=infobox|nocat={{{nocat|false}}}}}
+
| 1 = {{categorizer|category=Row 1 items|label=Row 1|nocat={{{nocat|false}}}}}
| 2 = {{categorizer|category=Row 2 items|label=Row 2|display=infobox|nocat={{{nocat|false}}}}}
+
| 2 = {{categorizer|category=Row 2 items|label=Row 2|nocat={{{nocat|false}}}}}
| 3 = {{categorizer|category=Row 3 items|label=Row 3|display=infobox|nocat={{{nocat|false}}}}}
+
| 3 = {{categorizer|category=Row 3 items|label=Row 3|nocat={{{nocat|false}}}}}
| 4 = {{categorizer|category=Row 4 items|label=Row 4|display=infobox|nocat={{{nocat|false}}}}}
+
| 4 = {{categorizer|category=Row 4 items|label=Row 4|nocat={{{nocat|false}}}}}
| 5 = {{categorizer|category=Row 5 items|label=Row 5|display=infobox|nocat={{{nocat|false}}}}}
+
| 5 = {{categorizer|category=Row 5 items|label=Row 5|nocat={{{nocat|false}}}}}
 
| none = {{
 
| none = {{
 
     #ifeq: {{lc:{{{column|}}}}} | none |
 
     #ifeq: {{lc:{{{column|}}}}} | none |
Line 21: Line 21:
 
}}
 
}}
 
{{#switch: {{lc:{{{column|}}}}}
 
{{#switch: {{lc:{{{column|}}}}}
| 1 = {{categorizer|category=Column 1 items|label=Column 1|display=infobox|nocat={{{nocat|false}}}}}
+
| 1 = {{categorizer|category=Column 1 items|label=Column 1|nocat={{{nocat|false}}}}}
| 2 = {{categorizer|category=Column 2 items|label=Column 2|display=infobox|nocat={{{nocat|false}}}}}
+
| 2 = {{categorizer|category=Column 2 items|label=Column 2|nocat={{{nocat|false}}}}}
| 3 = {{categorizer|category=Column 3 items|label=Column 3|display=infobox|nocat={{{nocat|false}}}}}
+
| 3 = {{categorizer|category=Column 3 items|label=Column 3|nocat={{{nocat|false}}}}}
| 4 = {{categorizer|category=Column 4 items|label=Column 4|display=infobox|nocat={{{nocat|false}}}}}
+
| 4 = {{categorizer|category=Column 4 items|label=Column 4|nocat={{{nocat|false}}}}}
| 5 = {{categorizer|category=Column 5 items|label=Column 5|display=infobox|nocat={{{nocat|false}}}}}
+
| 5 = {{categorizer|category=Column 5 items|label=Column 5|nocat={{{nocat|false}}}}}
| 6 = {{categorizer|category=Column 6 items|label=Column 6|display=infobox|nocat={{{nocat|false}}}}}
+
| 6 = {{categorizer|category=Column 6 items|label=Column 6|nocat={{{nocat|false}}}}}
| 7 = {{categorizer|category=Column 7 items|label=Column 7|display=infobox|nocat={{{nocat|false}}}}}
+
| 7 = {{categorizer|category=Column 7 items|label=Column 7|nocat={{{nocat|false}}}}}
 
| none = {{
 
| none = {{
 
     #ifeq: {{lc:{{{row|}}}}} | none |
 
     #ifeq: {{lc:{{{row|}}}}} | none |
Line 42: Line 42:
 
     |reason=The '''columnposition''' parameter specifies {{#if:{{{column|}}}|'{{lc:{{{column|}}}}}' (unknown)| no value}} }}
 
     |reason=The '''columnposition''' parameter specifies {{#if:{{{column|}}}|'{{lc:{{{column|}}}}}' (unknown)| no value}} }}
 
}}{{#ifeq: {{lc:{{{row|}}}{{{column|}}}}} | nonenone
 
}}{{#ifeq: {{lc:{{{row|}}}{{{column|}}}}} | nonenone
     |{{categorizer|category=Noninventory items|label=None|display=infobox|nocat={{{nocat|false}}}}}
+
     |{{categorizer|category=Noninventory items|display=none|nocat={{{nocat|false}}}}}
}}</includeonly><noinclude>
+
}}</includeonly><noinclude>{{Infobox Template
 +
|purpose=infobox
 +
|singletag=no
 +
|multiline=no
 +
|gamerelated=yes
 +
|suppressible=recursively
 +
|choice=single
 +
|cat1=Row 1 items!1 (row)
 +
|cat2=Row 2 items!2 (row)
 +
|cat3=Row 3 items!3 (row)
 +
|cat4=Row 4 items!4 (row)
 +
|cat5=Row 5 items!5 (row)
 +
|cat6=Column 1 items!1 (column)
 +
|cat7=Column 2 items!2 (column)
 +
|cat8=Column 3 items!3 (column)
 +
|cat9=Column 4 items!4 (column)
 +
|cat10=Column 5 items!5 (column)
 +
|cat11=Column 6 items!6 (column)
 +
|cat12=Column 7 items!7 (column)
 +
|cat13=Items of invalid position!''invalid''!maintenance
 +
|cat14=Items of unknown position!''unknown''!maintenance
 +
|var1=
 +
}}
 +
 
 
This template offers a multiple choice for defining the inventory position category of an (item) article. It can also automatically categorize a page under that category.
 
This template offers a multiple choice for defining the inventory position category of an (item) article. It can also automatically categorize a page under that category.
  
Line 59: Line 82:
 
  <nowiki>{{Infobox Item/position|row=3|column=5}}</nowiki>
 
  <nowiki>{{Infobox Item/position|row=3|column=5}}</nowiki>
 
  <nowiki>{{Infobox Item/position|column=3|row=2}}</nowiki>
 
  <nowiki>{{Infobox Item/position|column=3|row=2}}</nowiki>
<nowiki>{{Infobox Item/position|row=none|column=none}}</nowiki>
 
  
 
:{{categorizer|category=Row 3 items|label=Row 3|nocat=true}} {{categorizer|category=Column 5 items|label=Column 5|nocat=true}}
 
:{{categorizer|category=Row 3 items|label=Row 3|nocat=true}} {{categorizer|category=Column 5 items|label=Column 5|nocat=true}}
 
:{{categorizer|category=Row 2 items|label=Row 2|nocat=true}} {{categorizer|category=Column 3 items|label=Column 3|nocat=true}}
 
:{{categorizer|category=Row 2 items|label=Row 2|nocat=true}} {{categorizer|category=Column 3 items|label=Column 3|nocat=true}}
:{{categorizer|category=Noninventory items|label=None|nocat=true}}
 
  
  
You should not specify only row or column without a valid position (which would raise the [[:Category:Items of invalid position|Items of invalid position]] maintenance task), so these both have similar results:
+
You don't have to specify "position" for items that don't appear in the inventory, by specifying the "none" value for both parameters, so this won't display anything:
  <nowiki>{{Infobox Item/position|row=none|column=2}}</nowiki>
+
  <nowiki>{{Infobox Item/position|row=none|column=none}}</nowiki>
<nowiki>{{Infobox Item/position|row=2|column=none}}</nowiki>
+
  
:{{categorizer|category=Items of invalid position|label=''invalid''|nocat=true}} {{categorizer|category=Column 2 items|label=Column 2|nocat=true}}
+
Instead, this would still categorize the page under the [[:Category:Noninventory items|Noninventory items]] category, inline with the other values above.
:{{categorizer|category=Row 2 items|label=Row 2|nocat=true}} {{categorizer|category=Items of invalid position|label=''invalid''|nocat=true}}
+
  
  
Line 84: Line 103:
  
 
:{{categorizer|category=Items of unknown position|label=''unknown''|nocat=true}} {{categorizer|category=Items of unknown position|label=''unknown''|nocat=true}}
 
:{{categorizer|category=Items of unknown position|label=''unknown''|nocat=true}} {{categorizer|category=Items of unknown position|label=''unknown''|nocat=true}}
 +
 +
 +
It should not be possible for an item to only have a row position and no column position, or vice versa, so having only one of them specify "none" is invalid (which would also raise the [[:Category:Items of unknown position|Items of unknown position]] maintenance task):
 +
<nowiki>{{Infobox Item/position|row=18|column=2}}</nowiki>
 +
<nowiki>{{Infobox Item/position|row=none|column=2}}</nowiki>
 +
<nowiki>{{Infobox Item/position|row=2|column=18}}</nowiki>
 +
<nowiki>{{Infobox Item/position|row=2|column=none}}</nowiki>
 +
 +
:{{categorizer|category=Items of unknown position|label=''unknown''|nocat=true}} {{categorizer|category=Column 2 items|label=Column 2|nocat=true}}
 +
:{{categorizer|category=Items of unknown position|label=''invalid''|nocat=true}} {{categorizer|category=Column 2 items|label=Column 2|nocat=true}}
 +
:{{categorizer|category=Row 2 items|label=Row 2|nocat=true}} {{categorizer|category=Items of unknown position|label=''unknown''|nocat=true}}
 +
:{{categorizer|category=Row 2 items|label=Row 2|nocat=true}} {{categorizer|category=Items of unknown position|label=''invalid''|nocat=true}}
  
  
Line 91: Line 122:
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Row 3 items]] and [[:Category:Column 5 items]]. This feature works both on valid values and the maintenance tasks mentioned above.
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Row 3 items]] and [[:Category:Column 5 items]]. This feature works both on valid values and the maintenance tasks mentioned above.
  
[[Category:Categorizers|item]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:19, 6 June 2014

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

Parameters

  • row: The selected row position, in the range 1 - 5 or "none" (case insensitive, defaults to "unknown")
  • column: The selected column position, in the range 1 - 7 or "none" (case insensitive, defaults to "unknown")
  • nocat: Whether or not to suppress categorization under the chosen categories (defaults to false, which means auto categorization).


Syntax

{{Infobox Item/position|row=value|column=value}}

Examples

Commun use includes both the row and column parameters, like this:

{{Infobox Item/position|row=3|column=5}}
{{Infobox Item/position|column=3|row=2}}
Row 3 [list all] Column 5 [list all]
Row 2 [list all] Column 3 [list all]


You don't have to specify "position" for items that don't appear in the inventory, by specifying the "none" value for both parameters, so this won't display anything:

{{Infobox Item/position|row=none|column=none}}

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


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

{{Infobox Item/position}}
{{Infobox Item/position|}}
{{Infobox Item/position|row=}}
{{Infobox Item/position|column=}}
{{Infobox Item/position|row=|column=}}
{{Infobox Item/position|row=7|column=26273}}
{{Infobox Item/position|row=hello|column=world}}
unknown [list all] unknown [list all]


It should not be possible for an item to only have a row position and no column position, or vice versa, so having only one of them specify "none" is invalid (which would also raise the Items of unknown position maintenance task):

{{Infobox Item/position|row=18|column=2}}
{{Infobox Item/position|row=none|column=2}}
{{Infobox Item/position|row=2|column=18}}
{{Infobox Item/position|row=2|column=none}}
unknown [list all] Column 2 [list all]
invalid [list all] Column 2 [list all]
Row 2 [list all] unknown [list all]
Row 2 [list all] invalid [list all]


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

{{Infobox Item/position|row=3|column=5|nocat=true}}

This would render the same result as the first example above, but would not automatically categorize under Category:Row 3 items and Category:Column 5 items. This feature works both on valid values and the maintenance tasks mentioned above.