Difference between revisions of "Template:Weapon test"
Jump to navigation
Jump to search
(cleaned up pagename variables for testing) |
(remove pointless variables) |
||
Line 2: | Line 2: | ||
--- Define variables for properties used more than once in the template - goal is to only load each property from the Data page once. --- | --- Define variables for properties used more than once in the template - goal is to only load each property from the Data page once. --- | ||
-->{{#vardefine:RootPage|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!-- | -->{{#vardefine:RootPage|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!-- | ||
-->{{#vardefine:Rarity|{{:Weapon_data|{{#var:RootPage}}|Rarity}}}}<!-- | -->{{#vardefine:Rarity|{{:Weapon_data|{{#var:RootPage}}|Rarity}}}}<!-- | ||
-->{{#vardefine:Weapon Type|{{:Weapon_data|{{#var:RootPage}}|WeaponType}}}}<!-- | -->{{#vardefine:Weapon Type|{{:Weapon_data|{{#var:RootPage}}|WeaponType}}}}<!-- | ||
Line 37: | Line 34: | ||
-->{{#if:{{#var:Rending Damage}}|{{#var:Rending Damage}} {{Translate|Rending|Properties}} {{Translate|Damage|Properties}}<br>}}<!-- | -->{{#if:{{#var:Rending Damage}}|{{#var:Rending Damage}} {{Translate|Rending|Properties}} {{Translate|Damage|Properties}}<br>}}<!-- | ||
--- Swap the order of words for Russian wiki version on Fire, Frost, Shock, Poison and Caustic damage types, its a grammar/pronounciation thing apparently. --- | --- Swap the order of words for Russian wiki version on Fire, Frost, Shock, Poison and Caustic damage types, its a grammar/pronounciation thing apparently. --- | ||
-->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{#var:Fire Damage}} {{#ifeq: {{#titleparts: {{ | -->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{#var:Fire Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Fire|Properties}}|{{Translate|Fire|Properties}} {{Translate|Damage|Properties}}}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{#var:Frost Damage}} {{#ifeq: {{#titleparts: {{ | -->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{#var:Frost Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Frost|Properties}}|{{Translate|Frost|Properties}} {{Translate|Damage|Properties}}}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{#var:Shock Damage}} {{#ifeq: {{#titleparts: {{ | -->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{#var:Shock Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Shock|Properties}}|{{Translate|Shock|Properties}} {{Translate|Damage|Properties}}}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{#var:Poison Damage}} {{#ifeq: {{#titleparts: {{ | -->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{#var:Poison Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Poison|Properties}}|{{Translate|Poison|Properties}} {{Translate|Damage|Properties}}}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{#var:Caustic Damage}} {{#ifeq: {{#titleparts: {{ | -->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{#var:Caustic Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Caustic|Properties}}|{{Translate|Caustic|Properties}} {{Translate|Damage|Properties}}}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{#var:Arcane Damage}} {{Translate|Arcane|Properties}} {{Translate|Damage|Properties}}}}<br>}}<!-- | -->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{#var:Arcane Damage}} {{Translate|Arcane|Properties}} {{Translate|Damage|Properties}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{#var:Sacred Damage}} {{Translate|Sacred|Properties}} {{Translate|Damage|Properties}}}}<br>}}<!-- | -->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{#var:Sacred Damage}} {{Translate|Sacred|Properties}} {{Translate|Damage|Properties}}}}<br>}}<!-- | ||
Line 55: | Line 52: | ||
|style="color:#9d7969;text-align:justify"|<!-- | |style="color:#9d7969;text-align:justify"|<!-- | ||
--- Depending on which page we are currently on, description is loaded either from Data page, or from description translation template. --- | --- Depending on which page we are currently on, description is loaded either from Data page, or from description translation template. --- | ||
-->{{Tooltip rule}}{{#if: {{#titleparts: {{ | -->{{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}}|{{#ifeq: {{PAGENAME}}|{{#var:RootPage}}/Tooltip |{{#var:Description}}|{{Translate|{{#var:RootPage}}|ItemDescriptions}}}}|{{#var:Description}}}}<div style="float:right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{:Weapon_data|{{#var:RootPage}}|Price}}}}</div><br /> | ||
|- | |- | ||
|style="text-align:center;"|[[File:{{#if:{{:Weapon_data|{{#var:RootPage}}|Image}}|{{:Weapon_data|{{#var:RootPage}}|Image}}|{{#var:RootPage}}.png}}|class=image2x|link={{#ifeq:{{ | |style="text-align:center;"|[[File:{{#if:{{:Weapon_data|{{#var:RootPage}}|Image}}|{{:Weapon_data|{{#var:RootPage}}|Image}}|{{#var:RootPage}}.png}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{#var:RootPage}}|ItemNames}}|{{Translate|{{#var:RootPage}}|ItemNames}}]] | ||
|} | |} | ||
{{#if: {{#titleparts: {{ | {{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{#var:RootPage}}/Tooltip |[[Category:{{#var:Weapon Type}} Tooltips]]|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 3}}|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{#var:Weapon Type}} Tooltips]]|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{#var:Weapon Type}}]]}}}}|[[Category:{{#var:Weapon Type}}]]}}</includeonly><noinclude>{{doc}} | ||
[[Category:Tooltip templates]]</noinclude> | [[Category:Tooltip templates]]</noinclude> |
Revision as of 17:19, 31 May 2023
This template has no documentation. If you know how to use this template, please add some.