Difference between revisions of "Template:Valuable"

From Stoneshard wiki
Jump to navigation Jump to search
old>Phoe nixx
(make price float right at the same level as the description)
m (40 revisions imported)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{| width=300px;
<includeonly>{| width=300px;
|style="text-align: center;"|<span style="font-size: 20px;">{{Translate|{{#if:{{:{{ROOTPAGENAME}}|Name}}|{{:{{ROOTPAGENAME}}|Name}}|{{ROOTPAGENAME}}}}|ValuableNames}}</span><br><span style="color:#9d9a9a;">{{Translate|{{:{{ROOTPAGENAME}}|ItemType}}|Properties}}</span><hr style="height: 2px; background-color: #33323f; box-shadow: 0 2px #13121d; margin: 10px 0 10px 0;">
|style="text-align: center;"|<span style="font-size: 20px;">{{Translate|{{#if:{{:{{ROOTPAGENAME}}|Name}}|{{:{{ROOTPAGENAME}}|Name}}|{{ROOTPAGENAME}}}}|ValuableNames}}</span><br><span style="color:#9d9a9a;">{{Translate|{{:{{ROOTPAGENAME}}|ItemType}}|Properties}}</span>{{Tooltip rule}}
|-
|-
|{{Translate|{{#if:{{:{{ROOTPAGENAME}}|PropertyText}}|{{:{{ROOTPAGENAME}}|PropertyText}}|This item may interest some merchants.}}|Properties}}
|{{Translate|{{#if:{{:{{ROOTPAGENAME}}|PropertyText}}|{{:{{ROOTPAGENAME}}|PropertyText}}|This item may interest some merchants.}}|Properties}}
|-
|-
|style="color:#9d7969;"|<hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}} Description|ConsumableDescriptions}}}} | {{:{{ROOTPAGENAME}} |Description}}}}{{#if:{{:{{ROOTPAGENAME}}|Price}}|<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;"|{{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}} Description|ConsumableDescriptions}}}} | {{:{{ROOTPAGENAME}} |Description}}}}{{#if:{{:{{ROOTPAGENAME}}|Price}}|<div style="float:right">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{:{{ROOTPAGENAME}}|Price}}}}</div>}} <br />
|-
|-
|style="text-align: center;"|[[File:{{#if:{{:{{ROOTPAGENAME}}|Image}}|{{:{{ROOTPAGENAME}}|Image}}|{{ROOTPAGENAME}}.png}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ValuableNames}}|{{Translate|{{ROOTPAGENAME}}|ValuableNames}}]]{{#if:{{:{{ROOTPAGENAME}}|Image2}}|[[File:{{:{{ROOTPAGENAME}}|Image2}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ValuableNames}}|{{Translate|{{ROOTPAGENAME}}|ValuableNames}}]]}}
|style="text-align: center;"|[[File:{{#if:{{:{{ROOTPAGENAME}}|Image}}|{{:{{ROOTPAGENAME}}|Image}}|{{ROOTPAGENAME}}.png}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|class=image2x|alt={{Translate|{{ROOTPAGENAME}}|ValuableNames}}|{{Translate|{{ROOTPAGENAME}}|ValuableNames}}]]<!--
|}</includeonly>
 
<noinclude>
-->{{#if:{{:{{ROOTPAGENAME}}|Image2}}|[[File:{{:{{ROOTPAGENAME}}|Image2}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|class=image2x|alt={{Translate|{{ROOTPAGENAME}}|ValuableNames}}|{{Translate|{{ROOTPAGENAME}}|ValuableNames}}]]}}<!--
 
-->{{#if:{{:{{ROOTPAGENAME}}|Image3}}|[[File:{{:{{ROOTPAGENAME}}|Image3}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|class=image2x|alt={{Translate|{{ROOTPAGENAME}}|ValuableNames}}|{{Translate|{{ROOTPAGENAME}}|ValuableNames}}]]}}<!--
 
-->{{#if:{{:{{ROOTPAGENAME}}|Image4}}|[[File:{{:{{ROOTPAGENAME}}|Image4}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|class=image2x|alt={{Translate|{{ROOTPAGENAME}}|ValuableNames}}|{{Translate|{{ROOTPAGENAME}}|ValuableNames}}]]}}
|}</includeonly><noinclude>
{{Doc}}
{{Doc}}
[[Category:Tooltip templates]]
[[Category:Tooltip templates]]
</noinclude>
</noinclude>

Latest revision as of 21:38, 21 November 2021

Template-info.png Documentation

This is valuable template created for use together with the Template:Tooltip hover box template on a specific valuable's page or valuable's tooltip page.

Usage: The page itself must contain the valuable's data before this Template works. For example, if I wanted to create the Amethyst page, I'll add this code to the start of the page:

<includeonly>{{#switch: {{{1}}}
|ItemType = Valuable
|Description = This gem is prized for its rich color.
|Price = 100
|#default = 
}}</includeonly>

This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to Amethyst or Amethyst/Tooltip or Amethyst/anything page:

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

It will automatically load the valuable's data and fill them into this format. Go to Amethyst to see the result.