Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox ShopItems: Difference between revisions

Template page
Moved each type of item to its own template
Sur (talk | contribs)
m now uses item data via Module:ItemData/nav; changed weapon/vitality/spirit to their unlocalized names; localized front-displaying weapon/vitality/spirit
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 :) )
Similar to [[Template:Item Navbox]], but calls [[Template:ItemBox]] instead of [[Template:ItemIcon]] for each item's formatting. Simply set which ones you want to true when creating (Someone please let me know if this is bad for optimisation :) ) -Sur: Don't worry, your method is actually very efficient ;)
<templatedata>
<templatedata>
{
{
Line 8: Line 8:
"default": "false"
"default": "false"
},
},
"vitality items": {
"armor items": {
"description": "Choose whether or not to show Vitality Items",
"description": "Choose whether or not to show Armor (Vitality) Items",
"type": "boolean",
"type": "boolean",
"default": "false"
"default": "false"
},
},
"spirit items": {
"tech items": {
"description": "Choose whether or not to show Spirit Items.",
"description": "Choose whether or not to show Tech (Spirit) Items.",
"type": "boolean",
"type": "boolean",
"default": "false"
"default": "false"
Line 23: Line 23:


<onlyinclude>
<onlyinclude>
{{#vardefine:souls_style|font-size: 12px; text-shadow: 1px 1px rgba(0, 0, 0, 0.3);}}
{{#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      = [[File:Weapon Icon.png|30px|link={{#invoke:Lang|get_string|CitadelCategoryWeapon|fallback_str=en}}]] <b>{{#invoke:Dictionary|translate|Weapon Item}}</b>
|state      =  
|state      =  
|titlestyle = background-color:#ffefd7;
|titlestyle = background-color:#ffefd7;
Line 34: Line 35:
|above =  
|above =  
|group1    =  
|group1    =  
|list1      = {{Weapon Items}}
|list1      = {{Navbox subgroup
}}|}}{{#ifeq:{{{vitality items|}}}|true|
|groupstyle = background-color:#79511f;width:10%;
|group1    = {{Souls|500|Shadow={{#var:souls_style}}}}
|list1      = {{#invoke:ItemData/nav|get_item_nav_cards|Weapon|500|1250}}
    |group2    = {{Souls|1,250+|Shadow={{#var:souls_style}}}}
    |list2      = {{#invoke:ItemData/nav|get_item_nav_cards|Weapon|1250|3000}}
    |group3    = {{Souls|3,000+|Shadow={{#var:souls_style}}}}
    |list3      = {{#invoke:ItemData/nav|get_item_nav_cards|Weapon|3000|6200}}
    |group4    = {{Souls|6,200+|Shadow={{#var:souls_style}}}}
    |list4      = {{#invoke:ItemData/nav|get_item_nav_cards|Weapon|6200|10000}}
}}
}}|}}{{#ifeq:{{{armor items|}}}|true|
{{Navbox
{{Navbox
|name      = Items
|name      = Items
|title      = [[File:Vitality Icon.png|30px|link=Vitality]] <b>Vitality Items</b>
|title      = [[File:Vitality Icon.png|30px|link={{#invoke:Lang|get_string|CitadelCategoryArmor|fallback_str=en}}]] <b>{{#invoke:Dictionary|translate|Armor Item}}</b>
|state      =  
|state      =  
|titlestyle = background-color:#ffefd7;
|titlestyle = background-color:#ffefd7;
Line 46: Line 57:
|above =  
|above =  
|group1    =  
|group1    =  
|list1      = {{Vitality Items}}
|list1      = {{Navbox subgroup
}}|}}{{#ifeq:{{{spirit items|}}}|true|
|groupstyle = background-color:#79511f;width:10%;
|group1    = {{Souls|500|Shadow={{#var:souls_style}}}}
|list1      = {{#invoke:ItemData/nav|get_item_nav_cards|Armor|500|1250}}
    |group2    = {{Souls|1,250+|Shadow={{#var:souls_style}}}}
    |list2      = {{#invoke:ItemData/nav|get_item_nav_cards|Armor|1250|3000}}
    |group3    = {{Souls|3,000+|Shadow={{#var:souls_style}}}}
    |list3      = {{#invoke:ItemData/nav|get_item_nav_cards|Armor|3000|6200}}
    |group4    = {{Souls|6,200+|Shadow={{#var:souls_style}}}}
    |list4      = {{#invoke:ItemData/nav|get_item_nav_cards|Armor|6200|10000}}
}}
}}|}}{{#ifeq:{{{tech items|}}}|true|
{{Navbox
{{Navbox
|name      = Items
|name      = Items
|title      = [[File:Spirit icon.png|30px|link=Spirit]] <b>Spirit Items</b>
|title      = [[File:Spirit icon.png|30px|link={{#invoke:Lang|get_string|CitadelCategoryTech|fallback_str=en}}]] <b>{{#invoke:Dictionary|translate|Tech Item}}</b>
|state      =  
|state      =  
|titlestyle = background-color:#ffefd7;
|titlestyle = background-color:#ffefd7;
Line 58: Line 79:
|above =  
|above =  
|group1    =  
|group1    =  
|list1      = {{Spirit Items}}
|list1      = {{Navbox subgroup
|groupstyle = background-color:#79511f;width:10%;
|group1    = {{Souls|500|Shadow={{#var:souls_style}}}}
|list1      = {{#invoke:ItemData/nav|get_item_nav_cards|Tech|500|1250}}
    |group2    = {{Souls|1,250+|Shadow={{#var:souls_style}}}}
    |list2      = {{#invoke:ItemData/nav|get_item_nav_cards|Tech|1250|3000}}
    |group3    = {{Souls|3,000+|Shadow={{#var:souls_style}}}}
    |list3      = {{#invoke:ItemData/nav|get_item_nav_cards|Tech|3000|6200}}
    |group4    = {{Souls|6,200+|Shadow={{#var:souls_style}}}}
    |list4      = {{#invoke:ItemData/nav|get_item_nav_cards|Tech|6200|10000}}
}}
}}|}}</onlyinclude>
}}|}}</onlyinclude>


{{Infobox ShopItems|weapon items = true|vitality items = true|spirit items = true}}
{{Infobox ShopItems|weapon items = true|armor items = true|tech items = true}}