Difference between revisions of "Template:ValuableTable/row"

From Stoneshard wiki
Jump to navigation Jump to search
(Add test. Logic change.)
(Undo revision 69062 by Kaleb (talk))
Tag: Undo
 
Line 1: Line 1:
<includeonly>
<includeonly><!--
<!--
     --- Load complete datastring into a variable - to only load from the Loot data page once. ---
     --- Load complete datastring into a variable - to only load from the Loot data page once. ---
     -->
     -->{{#vardefine:Datastring|{{:Valuable_data|{{{1}}}}}}}<!--
    {{#vardefine:Datastring|{{:Valuable_data|{{{1}}}}}}}
    <!--
     -- Separate values from datastring into individual variables. --
     -- Separate values from datastring into individual variables. --
     -->
     -->{{#vardefine:ItemID|{{#explode: {{#var:Datastring}}|;|0}}}}<!--
    {{#vardefine:ItemID|{{#explode: {{#var:Datastring}}|;|0}}}}
     -->{{#vardefine:Image|{{#explode: {{#var:Datastring}}|;|1}}}}<!--
     {{#vardefine:Image|{{#explode: {{#var:Datastring}}|;|1}}}}
     -->{{#vardefine:InvSlots|{{#explode: {{#var:Datastring}}|;|2}}}}<!--
     {{#vardefine:InvSlots|{{#explode: {{#var:Datastring}}|;|2}}}}
     -->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|;|3}}}}<!--
     {{#vardefine:Price|{{#explode: {{#var:Datastring}}|;|3}}}}
     -->{{#vardefine:ItemDescription|{{#explode: {{#var:Datastring}}|;|4}}}}<!--
     {{#vardefine:ItemDescription|{{#explode: {{#var:Datastring}}|;|4}}}}
    <!--
     --- Load translations that are used multiple times into variables. ---
     --- Load translations that are used multiple times into variables. ---
     -->
     -->{{#vardefine:TranslateName|{{Translate|{{{1}}}|ItemNames}}}}
    {{#vardefine:TranslateName|{{Translate|{{{1}}}|ItemNames}}}}
     <!-- Determine the subdomain and fetch the appropriate description translation template. -->
     <!-- Determine the subdomain and fetch the appropriate description translation template. -->
     {{#vardefine:LangCode|{{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|default|{{SUBPAGENAME}}}}}}
     {{#vardefine:ItemDescription|{{#if:{{SUBPAGENAME}}|{{:Template:{{SUBPAGENAME}}_ValuableDescriptions|{{{1}}}}}|{{#var:ItemDescription}}}}}}
    {{#vardefine:TranslationTemplate|Template:{{#var:LangCode}}_ValuableDescriptions}}
    {{#vardefine:ItemDescription|{{#ifexist:{{#var:TranslationTemplate}}|{{:{{#var:TranslationTemplate}}|{{{1}}}}}|{{#var:ItemDescription}}}}}}
     |-
     |-
     <!-- Check if we are on a subpage. If subpagename = pagename, we are not on a subpage, therefore URL becomes "item name". If we are on a subpage, URL becomes "item name/subgpagename". Used for other languages. -->
     <!-- Check if we are on a subpage. If subpagename = pagename, we are not on a subpage, therefore URL becomes "item name". If we are on a subpage, URL becomes "item name/subgpagename". Used for other languages. -->

Latest revision as of 03:08, 15 January 2025

Template-info.png Documentation

This article is a stub. You can help Stoneshard wiki by expanding it.

This Template replicates the logic used for the Template:WeaponTable/row.

Syntax

{{ValuableTable/row|Agate}}

Usage

It should be used with a 'header', right before it.
{{ValuableTable/head}}
{{ValuableTable/row|Agate}}.

Any Valuables added in Valuable Data, can be used with the '/row' template.

Example

Item Inv. Slots Price Gold Icon Description



Agate
Agate
1×1 50 Gold.png Template:Row ValuableDescriptions