Difference between revisions of "Template:Vendor table row result format"
Jump to navigation
Jump to search
m |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{ | <includeonly>{{#vardefine:item_rarities|}}{{#vardefine:item_types|}}{{#vardefine:item_levels|}}{{#vardefine:data_store_obj|}}{{#arraymap:{{{item|}}}|+|@@@|<!-- | ||
--> | --><!-- Item page -->{{#iferror:{{#expr:{{#explode:{{#vardefineecho:item_qty_data|{{#explode:@@@| |0}}}}|&|0}}}}|{{#vardefine:item_qty_data|1}}{{#vardefine:item_page|@@@}}|{{#vardefine:item_page|{{#sub:@@@|{{#pos:@@@| }}}}}} }}<!-- | ||
-->{{# | --><!-- Rarity -->{{#vardefine:item_rarities|{{#var:item_rarities}}<br>{{#show:{{#var:item_page}}|?Has item rarity|link=none|outro=<br>|default=—}}}}<!-- | ||
-->{{#ifeq:{{#var: | --><!-- Types -->{{#vardefine:item_types|{{#var:item_types}}<br>{{#show:{{#var:item_page}}|?Has item type|link=none|outro=<br>|default=—}}}}<!-- | ||
-->{{#ifeq:{{#var: | --><!-- Levels -->{{#vardefine:item_levels|{{#var:item_levels}}{{#show:{{#var:item_page}}|?Has level requirement|link=none|outro=<br>|default=—}}}}<!-- | ||
--><!-- Item quantity -->{{#vardefine:item_qty|{{#explode:{{#var:item_qty_data|1}}|&|0}}}}{{#vardefine:item_qty_min|{{#explode:{{#var:item_qty|1}}|-|0}}}}{{#vardefine:item_qty_max|{{#explode:{{#var:item_qty}}|-|1}}}}<!-- | |||
--><!-- Item HQ? -->{{#vardefine:item_hq|{{#explode:{{#var:item_qty_data}}|&|1}}}}<!-- | |||
--><!-- Data Store Obj -->{{#vardefine:data_store_obj|{{#var:data_store_obj}}{{#if:{{#var:data_store_obj}}|^}}{{#var:item_page}};{{#var:item_qty_min}};{{#var:item_qty_max|?}};{{#if:{{#var:item_hq}}|true|false}}}}<!-- | |||
-->{{{{#if:{{#var:item_hq}}|STFI HQ|STFI}}|icon={{#if:{{#vardefineecho:item_icon|{{#explode:{{#show:{{#var:item_page}}|?Has game icon|link=none}}|:|1}}}}|{{#var:item_icon}}|{{#var:item_page}}.png}}|link={{#var:item_page}}|size=small}} {{#if:{{#var:item_hq}}|{{HQ|12|dark=y}}}} <!-- | |||
--> {{#if: {{#vardefineecho:item_name|{{#show:{{#var:item_page}}|?Has canonical name}}}} |[[{{#var:item_page}}|{{#var:item_name}}]] | [[{{#var:item_page}}]] }} {{#ifexpr: {{#var:item_qty_min|1}} > 1 | ({{#var:item_qty_min}}{{#if:{{#var:item_qty_max}}|-{{#var:item_qty_max}}}}) }}|<br>}}<!-- | |||
-->{{#ifeq:{{#var:showType}} | true | {{!!}} style="text-align:center" {{!}} {{#arraymap:{{#var:item_types}}|<br>|@@@|{{#arraymap:@@@|,|@@@@|{{#ifeq:@@@@|—|—|[[@@@@]]}}|, }}|<br>}} }}<!-- | |||
-->{{#ifeq:{{#var:showRarity}} | true | {{!!}} style="text-align:center" {{!}} {{#arraymap:{{#var:item_rarities}}|<br>|@@@|{{#ifeq:@@@|—|—|{{rarity|@@@}}}}|<br>}} }}<!-- | |||
-->{{#ifeq:{{#var:showLevel}} | true | {{!!}} style="text-align:center" {{!}} {{#var:item_levels}} }}</includeonly><noinclude> | |||
This template helps to format the row result for {{tl|Vendor table row}}. It contributes all columns apart from the cost. | This template helps to format the row result for {{tl|Vendor table row}}. It contributes all columns apart from the cost. | ||
[[Category:Vendor formatting templates]][[Category:Semantic result templates]] | [[Category:Vendor formatting templates]][[Category:Semantic result templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 21:15, 22 December 2023
This template helps to format the row result for {{Vendor table row}}. It contributes all columns apart from the cost.