Difference between revisions of "Template:Armor"

From Stoneshard wiki
Jump to navigation Jump to search
m (23 revisions imported)
(updated to load item data from Data page)
Line 1: Line 1:
<includeonly>{| width=300px; style="line-height:20px"
<includeonly>{| width=300px;
|style="text-align:center;"|{{#if:{{:{{ROOTPAGENAME}}|Unobtainable}}|{{Unobtainable}}<br />}}{{#if: {{:{{ROOTPAGENAME}}|Rarity}} | <span style="font-size: 20px;">{{c|{{:{{ROOTPAGENAME}}|Rarity}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|{{:{{ROOTPAGENAME}}|Rarity}}|Properties}} | <span style="font-size: 20px;">{{Translate|{{ROOTPAGENAME}}|ItemNames}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|Common|Properties}} }} {{Translate|{{:{{ROOTPAGENAME}}|ArmorType}}|Properties}}</span>{{Tooltip rule}}
|style="text-align:center;"|{{#if:{{:Data|{{ROOTPAGENAME}}|Unobtainable}}|{{Unobtainable}}<br />}}{{#if: {{:Data|{{ROOTPAGENAME}}|Rarity}} | <span style="font-size: 20px;">{{c|{{:Data|{{ROOTPAGENAME}}|Rarity}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|{{:Data|{{ROOTPAGENAME}}|Rarity}}|Properties}} | <span style="font-size: 20px;">{{Translate|{{ROOTPAGENAME}}|ItemNames}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|Common|Properties}} }} {{Translate|{{:Data|{{ROOTPAGENAME}}|ArmorType}}|Properties}}</span>{{Tooltip rule}}
|-
|-
|style="text-align:center;"|{{#if: {{:{{ROOTPAGENAME}}|Protection}} | {{:{{ROOTPAGENAME}}|Protection}} {{Translate|Protection|Properties}} {{Tooltip rule}} | }}
|style="text-align:center;"|{{#if: {{:Data|{{ROOTPAGENAME}}|Protection}} | {{:Data|{{ROOTPAGENAME}}|Protection}} {{Translate|Protection|Properties}} {{Tooltip rule}} | }}
|-
|-
|<div style="width:100%;float: left;color:#9d9a9a;">{{#if: {{:{{ROOTPAGENAME}}|NewProp}}|{{Test|{{ROOTPAGENAME}}}}|{{Properties|{{ROOTPAGENAME}}}}}}</div>
|<div style="width:100%;float: left;color:#9d9a9a;">{{Test|{{ROOTPAGENAME}}}}</div>
<div style="clear: both;color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{:{{ROOTPAGENAME}}|Durability}}/{{:{{ROOTPAGENAME}}|Durability}}</span></div>
<div style="clear: both;color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{:Data|{{ROOTPAGENAME}}|Durability}}/{{:Data|{{ROOTPAGENAME}}|Durability}}</span></div>
|-
|-
|style="color:#9d7969;text-align:justify"|{{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}}|ItemDescriptions}}}} | {{:{{ROOTPAGENAME}}|Description}}}}<div style="float:right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{:{{ROOTPAGENAME}}|Price}}}}</div><br />
|style="color:#9d7969;text-align:justify"|{{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:Data|{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}}|ItemDescriptions}}}} | {{:Data|{{ROOTPAGENAME}}|Description}}}}<div style="float:right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{:Data|{{ROOTPAGENAME}}|Price}}}}</div><br />
|-
|-
|style="text-align:center;"|[[File:{{#if:{{:{{ROOTPAGENAME}}|Image}}|{{:{{ROOTPAGENAME}}|Image}}|{{ROOTPAGENAME}}.png}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}]]<!--
|style="text-align:center;"|[[File:{{#if:{{:Data|{{ROOTPAGENAME}}|Image}}|{{:Data|{{ROOTPAGENAME}}|Image}}|{{ROOTPAGENAME}}.png}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}]]<!--


-->{{#if:{{:{{ROOTPAGENAME}}|Image2}}|[[File:{{:{{ROOTPAGENAME}}|Image2}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{#if:{{:{{ROOTPAGENAME}}|Name2}}|{{Translate|{{:{{ROOTPAGENAME}}|Name2}}|ItemNames}}|{{ROOTPAGENAME}}}}|{{#if:{{:{{ROOTPAGENAME}}|Name2}}|{{Translate|{{:{{ROOTPAGENAME}}|Name2}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}]]<!--
-->{{#if:{{:Data|{{ROOTPAGENAME}}|Image2}}|[[File:{{:Data|{{ROOTPAGENAME}}|Image2}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{#if:{{:Data|{{ROOTPAGENAME}}|Name2}}|{{Translate|{{:Data|{{ROOTPAGENAME}}|Name2}}|ItemNames}}|{{ROOTPAGENAME}}}}|{{#if:{{:Data|{{ROOTPAGENAME}}|Name2}}|{{Translate|{{:Data|{{ROOTPAGENAME}}|Name2}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}]]<!--


-->{{#if:{{:{{ROOTPAGENAME}}|Image3}}|<br />[[File:{{:{{ROOTPAGENAME}}|Image3}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{#if:{{:{{ROOTPAGENAME}}|Name3}}|{{Translate|{{:{{ROOTPAGENAME}}|Name3}}|ItemNames}}|{{ROOTPAGENAME}}}}|{{#if:{{:{{ROOTPAGENAME}}|Name3}}|{{Translate|{{:{{ROOTPAGENAME}}|Name3}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}]]<!--
-->{{#if:{{:Data|{{ROOTPAGENAME}}|Image3}}|<br />[[File:{{:Data|{{ROOTPAGENAME}}|Image3}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{#if:{{:Data|{{ROOTPAGENAME}}|Name3}}|{{Translate|{{:Data|{{ROOTPAGENAME}}|Name3}}|ItemNames}}|{{ROOTPAGENAME}}}}|{{#if:{{:Data|{{ROOTPAGENAME}}|Name3}}|{{Translate|{{:Data|{{ROOTPAGENAME}}|Name3}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}]]<!--


-->{{#if:{{:{{ROOTPAGENAME}}|Image4}}|[[File:{{:{{ROOTPAGENAME}}|Image4}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{#if:{{:{{ROOTPAGENAME}}|Name4}}|{{Translate|{{:{{ROOTPAGENAME}}|Name4}}|ItemNames}}|{{ROOTPAGENAME}}}}|{{#if:{{:{{ROOTPAGENAME}}|Name4}}|{{Translate|{{:{{ROOTPAGENAME}}|Name4}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}]]}}}}}}
-->{{#if:{{:Data|{{ROOTPAGENAME}}|Image4}}|[[File:{{:Data|{{ROOTPAGENAME}}|Image4}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{#if:{{:Data|{{ROOTPAGENAME}}|Name4}}|{{Translate|{{:Data|{{ROOTPAGENAME}}|Name4}}|ItemNames}}|{{ROOTPAGENAME}}}}|{{#if:{{:Data|{{ROOTPAGENAME}}|Name4}}|{{Translate|{{:Data|{{ROOTPAGENAME}}|Name4}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}]]}}}}}}
|}
|}
{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip |[[Category:{{:{{ROOTPAGENAME}}|ArmorType}} Tooltips]]|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 3}}|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{:{{ROOTPAGENAME}}|ArmorType}} Tooltips]]|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{:{{ROOTPAGENAME}}|ArmorType}}]]}}}}|[[Category:{{:{{ROOTPAGENAME}}|ArmorType}}]]}}</includeonly><noinclude>{{doc}}
{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip |[[Category:{{:Data|{{ROOTPAGENAME}}|ArmorType}} Tooltips]]|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 3}}|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{:Data|{{ROOTPAGENAME}}|ArmorType}} Tooltips]]|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{:Data|{{ROOTPAGENAME}}|ArmorType}}]]}}}}|[[Category: {{:Data|{{ROOTPAGENAME}}|ArmorType}}]]}}</includeonly><noinclude>{{doc}}
[[Category:Tooltip templates]]</noinclude>
[[Category:Tooltip templates]]</noinclude>

Revision as of 17:15, 27 May 2022

Template-info.png Documentation

This is armor template created for use together with the Template:Tooltip hover box template to display tooltip with item attributes for armor and jewelry.

Usage: Copy this code to any page where you want to display the item tooltip:

{{{{{1|Tooltip hover box}}}|title={{Armor}}}}

You can provide the item name as first parameter, otherwise the pagename is used.

By default, the page is also labelled with a category corresponding to the item type (ie. Venemist's Talisman will receive the Category: Amulet). If you don't want to add this category to a page, add the category parameter:

{{{{{1|Tooltip hover box}}}|title={{Armor|Venemist's Talisman|category=no}}}}
Armor
Common
Durability: /

Price

Armor

[[Category: ]]

Armor
Common
Durability: /

Price

Armor

[[Category: ]]

Armor
Common
Durability: /

Price

Armor

[[Category: ]]

Armor
Common
Durability: /

Price

Armor

[[Category: ]]