Difference between revisions of "Template:Vendor list result format"
Jump to navigation
Jump to search
Freedom4556 (talk | contribs) (Undo revision 645515 by Freedom4556 (talk)) Tag: Undo |
|||
(42 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>|- {{#ifeq: {{{14|false}}} | true | title="Vendor currently unavailable" class="gray" | <includeonly>|- {{#ifeq: {{{14|false}}} | true | title="Vendor currently unavailable" class="gray" | ||
| {{#ifeq: {{{15|false}}} | true | title="Item currently unavailable" class="gray" }} }} | | {{#ifeq: {{{15|false}}} | true | title="Item currently unavailable" class="gray" }} }} | ||
{{#vardefine:item_data|{{#arraymap:{{{ | {{#vardefine:item_data|{{#arraymap:{{{6|}}}^{{{7|}}}^{{{8|}}}^{{{9|}}}|^|@@@|{{#if:@@@|{{#ifeq:{{#explode:@@@|(|0}}|{{{userparam|}}}|{{#normalizerec:@@@}}|}}}}|}}}} | ||
| {{#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}} | {{#ifeq: {{{14|false}}}|true|{{No|red|tooltip=Vendor currently unavailable}}}} [[{{{1}}}|{{#var:smw_name}}]] | [[{{{1}}}|{{{2}}}]] }} | ||
{{#ifeq:{{#var:showSection|false}}|true| {{!}} style="max-width:180px;" {{!}} {{{3}}} }} | {{#ifeq:{{#var:showSection|false}}|true| {{!}} style="max-width:180px;" {{!}} {{{3}}} }} | ||
| style="max-width:400px;" | {{#if:{{{4|}}}|{{cname|{{{4}}}}}|{{#show:{{{2|}}}|?Located in|default=–|sep=;}}}} ({{#if:{{{5|}}}|{{cname|{{{5}}}}}|{{#show:{{{2|}}}|?Has x coordinate|default=–|sep=;}}}}, {{#if:{{{5|}}}|{{cname|{{{5}}}}}|{{#show:{{{2|}}}|?Has y coordinate|default=–|sep=;}}}}) | | style="max-width:400px;" | {{#if:{{{4|}}}|{{cname|{{{4}}}}}|{{#show:{{{2|}}}|?Located in|default=–|sep=;}}}} ({{#if:{{{5|}}}|{{cname|{{{5}}}}}|{{#show:{{{2|}}}|?Has x coordinate|default=–|sep=;}}}}, {{#if:{{{5|}}}|{{cname|{{{5}}}}}|{{#show:{{{2|}}}|?Has y coordinate|default=–|sep=;}}}}) | ||
| 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||}}<!-- Costs -->{{# | | {{{3|}}} | ||
| 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||}}<!-- Costs -->{{#if:{{{10|}}}|{{#arraymap:{{{10|}}}^{{{11|}}}^{{{12|}}}^{{{13|}}}|^|@@@| | |||
{{#if:@@@|{{#vardefine:item_cost|{{#normalizerec:@@@}}}}<!-- | {{#if:@@@|{{#vardefine:item_cost|{{#normalizerec:@@@}}}}<!-- | ||
-->{{currency|{{#explode:{{#var:item_cost}}|,<nowiki> </nowiki>|0}}|{{#if:T|{{#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}})}} }}| + }} | -->{{currency|{{#explode:{{#var:item_cost}}|,<nowiki> </nowiki>|0}}|{{#if:T|{{#replace:{{#replace:{{#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}})}} }}| + }}{{#switch:{{#show:{{#if:T|{{#explode:{{#var:item_cost}}|,<nowiki> </nowiki>|1}}}}|?Has context}}|Item|Currency=|#default=[[Category:Pages with non-item vendor costs]]{{#set:Has non-item vendor cost=true}}}}|Free}} | ||
|<!--Additional unlock requirements-->{{#if:{{{16|}}}{{{17|}}}{{{18|}}}|{{#if:{{{16|}}}|{{{16|}}}<br>}}{{#if:{{{18|}}}|{{{18|}}}<br>}}{{#if:{{{19|}}}||{{#if:{{{17|}}}|{{questlink|{{#show:{{{17|}}}|?Has quest type}}|{{{17|}}}}}}}}}|—}} | |||
</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: | ||
#Vendor subobject | #Vendor subobject (2) | ||
#Has vendor | #Has vendor (3) | ||
#Has vendor section | #Has vendor section (4) | ||
#Has vendor location | #Has vendor location (5) | ||
#Sells item 1 | #Sells item 1 (6) | ||
#Sells item 2 | #Sells item 2 (7) | ||
#Sells item 3 | #Sells item 3 (8) | ||
#Sells item 4 | #Sells item 4 (9) | ||
#Has item cost 1 | #Has item cost 1 (10) | ||
#Has item cost 2 | #Has item cost 2 (11) | ||
#Has item cost 3 | #Has item cost 3 (12) | ||
#Has item cost 4 | #Has item cost 4 (13) | ||
#Has vendor | #Has vendor.Is historical (14) | ||
#Has vendor. | #Is historical (15) | ||
# | #Has item additional requirement (16) | ||
#Has vendor.Has vendor quest unlock (17) | |||
#Has vendor.Has vendor misc unlock (18) | |||
#Suppress vendor unlock (19) | |||
[[Category:Vendor formatting templates]] | [[Category:Vendor formatting templates]] | ||
[[Category:Semantic result templates]] | [[Category:Semantic result templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 06:51, 1 February 2024
This semantic result template is used for formatting results from {{vendor list}} and {{vendor table}}. The following parameters are passed to the template:
- Vendor subobject (2)
- Has vendor (3)
- Has vendor section (4)
- Has vendor location (5)
- Sells item 1 (6)
- Sells item 2 (7)
- Sells item 3 (8)
- Sells item 4 (9)
- Has item cost 1 (10)
- Has item cost 2 (11)
- Has item cost 3 (12)
- Has item cost 4 (13)
- Has vendor.Is historical (14)
- Is historical (15)
- Has item additional requirement (16)
- Has vendor.Has vendor quest unlock (17)
- Has vendor.Has vendor misc unlock (18)
- Suppress vendor unlock (19)