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

From Twinsuniverse
Jump to: navigation, search
m (eliminated the display parameter of the categorizer)
(added infobox)
 
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
 
{{#switch: {{lc:{{{1|}}}}}
 
{{#switch: {{lc:{{{1|}}}}}
| none = {{categorizer|nocat={{{nocat|false}}}
+
| none = {{categorizer|category=Powerless items|label=None|nocat={{{nocat|false}}}}}
    |category=Powerless items
+
| yellow = {{categorizer|category=Yellow level items|label=Magic Level Yellow|nocat={{{nocat|false}}}}}
    |label=None}}
+
| green = {{categorizer|category=Green level items|label=Magic Level Green|nocat={{{nocat|false}}}}}
| yellow = {{categorizer|nocat={{{nocat|false}}}
+
| red = {{categorizer|category=Red level items|label=Magic Level Red|nocat={{{nocat|false}}}}}
    |category=Yellow level items
+
| fire = {{categorizer|category=Fire level items|label=Magic Level Fire|nocat={{{nocat|false}}}}}
    |label=Magic Level Yellow}}
+
| all = {{categorizer|category=All-level items|label=All Magic Levels|nocat={{{nocat|false}}}}}
| green = {{categorizer|nocat={{{nocat|false}}}
+
    |category=Green level items
+
    |label=Magic Level Green}}
+
| red = {{categorizer|nocat={{{nocat|false}}}
+
    |category=Red level items
+
    |label=Magic Level Red}}
+
| fire = {{categorizer|nocat={{{nocat|false}}}
+
    |category=Fire level items
+
    |label=Magic Level Fire}}
+
| all = {{categorizer|nocat={{{nocat|false}}}
+
    |category=All-level items
+
    |label=All Magic Levels}}
+
 
| {{maintenance task|nocat={{{nocat|false}}}
 
| {{maintenance task|nocat={{{nocat|false}}}
 
     |category=Items with an unknown powerlevel
 
     |category=Items with an unknown powerlevel
Line 24: Line 12:
 
     |label=''unknown''
 
     |label=''unknown''
 
     |reason=The '''powerlevel''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }}
 
     |reason=The '''powerlevel''' 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=Powerless items!none
 +
|cat2=Yellow level items!yellow
 +
|cat3=Green level items!green
 +
|cat4=Red level items!red
 +
|cat5=Fire level items!fire
 +
|cat6=All-level items!all
 +
|cat7=Items with an unknown powerlevel!''unknown''!maintenance
 +
|var1=
 +
}}
 +
 
 
This template offers a multiple choice for defining the powerlevel category of an (item) article. It can also automatically categorize a page under that category.
 
This template offers a multiple choice for defining the powerlevel category of an (item) article. It can also automatically categorize a page under that category.
  
Line 86: Line 90:
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Powerless 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:Powerless items]]. This feature works both on valid values and the maintenance task mentioned above.
  
[[Category:Categorizers|item]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 18:19, 6 June 2014

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

Parameters

  1. The selected powerlevel from the following values (no parameter name and values are case insensitive):
    • none
    • yellow
    • green
    • red
    • fire
    • all
    • 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/powerlevel|value}}

Examples

Any of the above values may be used like this:

{{Infobox Item/powerlevel|none}}
{{Infobox Item/powerlevel|yellow}}
{{Infobox Item/powerlevel|green}}
{{Infobox Item/powerlevel|red}}
{{Infobox Item/powerlevel|fire}}
None [list all]
Magic Level Yellow [list all]
Magic Level Green [list all]
Magic Level Red [list all]
Magic Level Fire [list all]


Some items are not of a specific powerlevel, but grow in power as Twinsen reaches new magic levels, or simply have an effect on all levels. In that case, use this value:

{{Infobox Item/powerlevel|all}}
All Magic Levels [list all]


The case of the value is not important:

{{Infobox Item/powerlevel|grEEn}}
Magic Level Green [list all]


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

{{Infobox Item/powerlevel}}
{{Infobox Item/powerlevel|}}
{{Infobox Item/powerlevel|blue}}
{{Infobox Item/powerlevel|standby}}
{{Infobox Item/powerlevel|microwave}}
unknown [list all]


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

{{Infobox Item/powerlevel|none|nocat=true}}

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