Difference between revisions of "Template:Vendor list result format"

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
m
(upgrading)
Line 1: Line 1:
<includeonly>|-
<includeonly>|- {{#vardefine:item_data|{{#arraymap:{{{6|}}}^{{{7|}}}^{{{8|}}}^{{{9|}}}|^|@@@|{{#if:@@@|{{#ifeq:{{#explode:@@@|(|0}}|{{{userparam|}}}|{{Normalize record|@@@}}|}}}}|}}}}
| {{#vardefine:smw_name|{{#show:{{{2|}}}|?Has canonical name}}}} data-sort-value="{{#if: {{#var:smw_name}} | {{#var:smw_name}} | {{{2}}} }}" | {{#if: {{#var:smw_name}} | [[{{{1}}}|{{#var:smw_name}}]] | [[{{{1}}}|{{{2}}}]] }}
| {{#vardefine:smw_name|{{#show:{{{2|}}}|?Has canonical name}}}} data-sort-value="{{#if: {{#var:smw_name}} | {{#var:smw_name}} | {{{2}}} }}" | {{#if: {{#var:smw_name}} | [[{{{1}}}|{{#var:smw_name}}]] | [[{{{1}}}|{{{2}}}]] }}
{{#ifeq:{{#var:showSection|false}}|true| {{!}} style="max-width:100px;" {{!}} {{{3}}} }}
{{#ifeq:{{#var:showSection|false}}|true| {{!}} style="max-width:100px;" {{!}} {{{3}}} }}
| style="max-width:400px;" | {{#if:{{{6|}}}|{{cname|{{{6}}}}}|{{#show:{{{2|}}}|?Located in|default=–|sep=;}}}}
| style="max-width:400px;" | {{#if:{{{5|}}}|{{cname|{{{5}}}}}|{{#show:{{{2|}}}|?Located in|default=–|sep=;}}}}
| style="text-align:left; padding-top: 0.4em;" | <!-- min qty --> {{#vardefine:item_min_qty|{{#explode:{{{5|1}}}|(|0}}}}<!-- max qty -->{{#vardefine:item_max_qty|{{#replace:{{#explode:{{{5}}}|(|1}}|)|}}}}<!-- check -->{{#ifeq:{{#var:item_min_qty}}|1|<!--Nothing-->|({{#var:item_min_qty}}{{#if:{{#var:item_max_qty}}|-{{#var:item_max_qty}}}})&nbsp;/&nbsp;}}{{#arraymap:{{#replace:{{{4}}}|.|}}<!--fix for languages that use dots as thousand separators-->,|),|@@@|
| style="text-align:left; padding-top: 0.4em;" | <!-- Quantity -->{{#vardefine:item_min_qty|{{#explode:{{#var:item_data}}|,|1}}}}{{#vardefine:item_max_qty|{{#explode:{{#var:item_data}}|,|2}}}}{{#ifeq:{{#var:item_min_qty}}|1||({{#var:item_min_qty}}{{#ifeq:{{#var:item_max_qty}}|?||-{{#var:item_max_qty}}}})&nbsp;/&nbsp;}}<!-- Costs -->{{#arraymap:{{{10|}}}^{{{11|}}}^{{{12|}}}^{{{13|}}}|^|@@@|
{{currency|{{#replace:{{#explode:@@@| }}|,|}}| {{#sub:@@@|{{#expr:2+{{#pos:@@@| }}}}}}| text = {{#if:{{#var:showCostText|}}|+}} }}
{{#if:@@@|{{#vardefine:item_cost|{{Normalize record|@@@}}}}<!--
|&nbsp;+&nbsp;}}
-->{{currency|{{#explode:{{#var:item_cost}}|,<nowiki> </nowiki>|0}}|{{#explode:{{#var:item_cost}}|,<nowiki> </nowiki>|1}}|hq={{#ifeq:{{#explode:{{#var:item_cost}}|,<nowiki> </nowiki>|3}}|true|y|}}| text = {{#if:{{#var:showCostText|}}|+}}}} {{#ifeq:{{#vardefineecho:item_collectability|{{#explode:{{#var:item_cost}}|,<nowiki> </nowiki>|2}}}}|?||({{Collectable|12}} {{#var:item_collectability}})}} }}|&nbsp;+&nbsp;}}
</includeonly><noinclude>
</includeonly><noinclude>
This semantic result template is used for formatting results from {{tl|vendor list}} and {{tl|vendor table}}. The following parameters are passed to the template:
This semantic result template is used for formatting results from {{tl|vendor list}} and {{tl|vendor table}}. The following parameters are passed to the template:
Line 12: Line 12:
#Has vendor section
#Has vendor section
#Has item cost
#Has item cost
#Has item quantity
#Has vendor location
#Has vendor location
#Sells item 1
#Sells item 2
#Sells item 3
#Sells item 4
#Has item cost 1
#Has item cost 2
#Has item cost 3
#Has item cost 4


[[Category:Vendor formatting templates]]
[[Category:Vendor formatting templates]]
[[Category:Semantic result templates]]
[[Category:Semantic result templates]]
</noinclude>
</noinclude>

Revision as of 13:14, 7 November 2018

This semantic result template is used for formatting results from {{vendor list}} and {{vendor table}}. The following parameters are passed to the template:

  1. Vendor subobject
  2. Has vendor
  3. Has vendor section
  4. Has item cost
  5. Has vendor location
  6. Sells item 1
  7. Sells item 2
  8. Sells item 3
  9. Sells item 4
  10. Has item cost 1
  11. Has item cost 2
  12. Has item cost 3
  13. Has item cost 4