Template:Item Navbox v2: Difference between revisions

Moved each type of item to its own template
m Gammaton32 moved page Template:Infobox ShopItems to Template:Item Navbox v2: better name
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Custom template containing 3 navboxes. Simply set which ones you want to true when creating (Someone please let me know if this is bad for optimisation :) )
{{#vardefine:souls_style|font-size: 12px; text-shadow: 1px 1px rgba(0, 0, 0, 0.3);}}
<templatedata>
{
"params": {
"weapon items": {
"description": "Choose whether or not to show Weapon items.",
"type": "boolean",
"default": "false"
},
"vitality items": {
"description": "Choose whether or not to show Vitality Items",
"type": "boolean",
"default": "false"
},
"spirit items": {
"description": "Choose whether or not to show Spirit Items.",
"type": "boolean",
"default": "false"
}
}
}
</templatedata>
 
<onlyinclude>
{{#ifeq:{{{weapon items|}}}|true|
{{#ifeq:{{{weapon items|}}}|true|
{{Navbox
{{Navbox
|name      = Items
|name      = Items
|title      = [[File:Weapon Icon.png|30px|link=Weapon]] <b>Weapon Items</b>
|title      = {{ItemType|Weapon|color=true}}
|state      =  
|state      =  
|titlestyle = background-color:#ffefd7;
|titlestyle = background-color:#ffefd7;
Line 34: Line 11:
|above =  
|above =  
|group1    =  
|group1    =  
|list1      = {{Weapon Items}}
|list1      = {{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_cards}}
}}|}}{{#ifeq:{{{vitality items|}}}|true|
}}|}}{{#ifeq:{{{armor items|}}}|true|
{{Navbox
{{Navbox
|name      = Items
|name      = Items
|title      = [[File:Vitality Icon.png|30px|link=Vitality]] <b>Vitality Items</b>
|title      = {{ItemType|Armor|color=true}}
|state      =  
|state      =  
|titlestyle = background-color:#ffefd7;
|titlestyle = background-color:#ffefd7;
Line 46: Line 23:
|above =  
|above =  
|group1    =  
|group1    =  
|list1      = {{Vitality Items}}
|list1      = {{#invoke:ItemData/nav|write_item_slot_subgroup|Armor|get_item_nav_cards}}
}}|}}{{#ifeq:{{{spirit items|}}}|true|
}}|}}{{#ifeq:{{{tech items|}}}|true|
{{Navbox
{{Navbox
|name      = Items
|name      = Items
|title      = [[File:Spirit icon.png|30px|link=Spirit]] <b>Spirit Items</b>
|title      = {{ItemType|Tech|color=true}}
|state      =  
|state      =  
|titlestyle = background-color:#ffefd7;
|titlestyle = background-color:#ffefd7;
Line 58: Line 35:
|above =  
|above =  
|group1    =  
|group1    =  
|list1      = {{Spirit Items}}
|list1      = {{#invoke:ItemData/nav|write_item_slot_subgroup|Tech|get_item_nav_cards}}
}}|}}</onlyinclude>
}}|}}<noinclude>{{Documentation}}</noinclude>
 
{{Infobox ShopItems|weapon items = true|vitality items = true|spirit items = true}}