Template:Infobox item/doc: Difference between revisions

Jump to navigation Jump to search
reorder
reorder, cleanup var types, add example
Line 2: Line 2:
This template creates an infobox for items. It automatically categorizes the pages it is transcluded onto in [[:Category:Items]].
This template creates an infobox for items. It automatically categorizes the pages it is transcluded onto in [[:Category:Items]].


== Example ==
== Examples ==
<pre>
<pre>
{{Infobox item
{{Infobox item
Line 63: Line 63:
|active1_stat4=6s Duration
|active1_stat4=6s Duration
}}
}}
 
{{Clear}}
<pre>
{{Infobox item
|item_imagefilepath=Heroic Aura
|item_name=Soul Shredder Bullets
|item_type=Spirit
|item_tier=3
|souls = 2,555
|has_components=true
|component1_name=Basic Magazine
|has_passive1=true
|has_active1=true
|has_iscomponentof=true
|iscomponentof1_name=Refresher
}}
</pre>
{{Infobox item
|item_imagefilepath=Heroic Aura
|item_name=Soul Shredder Bullets
|item_type=Spirit
|item_tier=3
|souls = 2,555
|has_components=true
|component1_name=Basic Magazine
|has_passive1=true
|has_active1=true
|has_iscomponentof=true
|iscomponentof1_name=Refresher
}}
<templatedata>
<templatedata>
{
{
Line 69: Line 97:
"souls": {
"souls": {
"type": "number",
"type": "number",
"required": true
"required": true,
"default": "3,000"
},
},
"item_name": {
"item_name": {
Line 112: Line 141:
},
},
"has_components": {
"has_components": {
"type": "string",
"type": "boolean",
"default": "false",
"default": "false",
"autovalue": "false",
"autovalue": "false",
"required": true,
"suggestedvalues": [
"suggestedvalues": [
"true",
"true",
Line 122: Line 150:
},
},
"component1_name": {
"component1_name": {
"type": "wiki-page-name"
"type": "string",
"default": "Basic Magazine"
},
},
"iscomponentof1_name": {
"iscomponentof1_name": {
Line 244: Line 273:
"item_type",
"item_type",
"item_tier",
"item_tier",
"souls",
"has_components",
"has_components",
"component1_name",
"has_passive1",
"has_passive1",
"has_passive2",
"has_passive2",
Line 255: Line 286:
"item_stat4",
"item_stat4",
"item_stat5",
"item_stat5",
"souls",
"component1_name",
"passive1_description",
"passive1_description",
"passive1_cooldown",
"passive1_cooldown",
Line 280: Line 309:
"iscomponentof1_name"
"iscomponentof1_name"
],
],
"description": "Infobox template for items",
"description": " ",
"format": "block"
"format": "block"
}
}
</templatedata><includeonly>[[Category:Infobox templates]]</includeonly>
</templatedata><includeonly>[[Category:Infobox templates]]</includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>