Difference between revisions of "Template:Test"
Jump to navigation
Jump to search
(add check for Consumable, same as Weapons and Armor) |
(reduce post-expand include size by reducing the Datastring size) |
||
Line 28: | Line 28: | ||
--- Load complete datastring into a variable - only load from the Weapon data page once. --- | --- Load complete datastring into a variable - only load from the Weapon data page once. --- | ||
-->{{#ifeq: {{:Weapon_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Weapon_data|{{{1}}}}}}}<!-- | -->{{#ifeq: {{:Weapon_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Weapon_data|{{{1}}}}}}}<!-- | ||
--- This template doesn't use Description, remove it for smaller size --- | |||
-->{{#vardefine:Datastring|{{#sub:{{#var:Datastring}}|0|{{#expr: {{#len:{{#var:Datastring}}}} - {{#len:{{#explode: {{#var:Datastring}}|;|-1}}}}}}}}}}<!-- | |||
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | -->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | ||
|Sword | |Sword | ||
Line 91: | Line 93: | ||
--- Load complete datastring into a variable - only load from the Consumable data page once. --- | --- Load complete datastring into a variable - only load from the Consumable data page once. --- | ||
-->{{#ifeq: {{:Consumable_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Consumable_data|{{{1}}}}}}}<!-- | -->{{#ifeq: {{:Consumable_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Consumable_data|{{{1}}}}}}}<!-- | ||
--- This template doesn't use Description, remove it for smaller size --- | |||
-->{{#vardefine:Datastring|{{#sub:{{#var:Datastring}}|0|{{#expr: {{#len:{{#var:Datastring}}}} - {{#len:{{#explode: {{#var:Datastring}}|;|-1}}}}}}}}}}<!-- | |||
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | -->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | ||
|Food | |Food | ||
Line 132: | Line 136: | ||
--- Load complete datastring into a variable - to only load from the Armor data page once. --- | --- Load complete datastring into a variable - to only load from the Armor data page once. --- | ||
-->{{#ifeq: {{:Armor_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Armor_data|{{{1}}}}}}}<!-- | -->{{#ifeq: {{:Armor_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Armor_data|{{{1}}}}}}}<!-- | ||
--- This template doesn't use Description, remove it for smaller size --- | |||
-->{{#vardefine:Datastring|{{#sub:{{#var:Datastring}}|0|{{#expr: {{#len:{{#var:Datastring}}}} - {{#len:{{#explode: {{#var:Datastring}}|;|-1}}}}}}}}}}<!-- | |||
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | -->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | ||
|Shield | |Shield |
Latest revision as of 22:48, 16 January 2025
This template has no documentation. If you know how to use this template, please add some.