Difference between revisions of "Template:Vendor item table result format"
Jump to navigation
Jump to search
(Fix for item names with parentheses in them) |
|||
Line 6: | Line 6: | ||
--><!-- Name --> [[{{#var:item_page}}|{{#show:{{#var:item_page}}|?Has canonical name|default={{#var:item_page}}}}]]<!-- | --><!-- Name --> [[{{#var:item_page}}|{{#show:{{#var:item_page}}|?Has canonical name|default={{#var:item_page}}}}]]<!-- | ||
--><!-- Quantity -->{{#vardefine:item_min_qty|{{#explode:{{#var:item_details}}|,|0}}}}{{#vardefine:item_max_qty|{{#explode:{{#var:item_details}}|,|1}}}}{{#ifeq:{{#var:item_min_qty}}|1|| ({{#var:item_min_qty}}{{#ifeq:{{#var:item_max_qty}}|?||-{{#var:item_max_qty}}}})}}|<br>}} | --><!-- Quantity -->{{#vardefine:item_min_qty|{{#explode:{{#var:item_details}}|,|0}}}}{{#vardefine:item_max_qty|{{#explode:{{#var:item_details}}|,|1}}}}{{#ifeq:{{#var:item_min_qty}}|1|| ({{#var:item_min_qty}}{{#ifeq:{{#var:item_max_qty}}|?||-{{#var:item_max_qty}}}})}}|<br>}} | ||
| {{#var:item_data}}{{cname|{{{6}}}}} {{#ifeq: {{{7|}}} | General || ({{{7}}}) }} | | {{#var:item_data}}{{cname|{{{6}}}}} {{#ifeq: {{{7|}}} | General || ({{{7}}}) }} | ||
| {{#if:{{{8|}}}|[[{{#vardefineecho:vitr_area|{{{8|}}}}}]]}} | | {{#if:{{{8|}}}|[[{{#vardefineecho:vitr_area|{{{8|}}}}}]]}} ({{#show:{{{6}}}|?Has x coordinate|default=}}, {{#show:{{{6}}}|?Has y coordinate|default=}}) | ||
| {{#if: {{#var:vitr_area}} | {{#if: {{#pos: {{#var:vitr_area}} |;}}<!-- check if more than one area --> | | {{#if: {{#var:vitr_area}} | {{#if: {{#pos: {{#var:vitr_area}} |;}}<!-- check if more than one area --> | ||
| – <!-- more than one area, don't show every parent zone (could be duplicates) --> | | – <!-- more than one area, don't show every parent zone (could be duplicates) --> |
Revision as of 14:03, 6 March 2022
This semantic result template is used for formatting results from {{Vendor item table row}} and {{Vendor table}}. The following parameters are passed to the template:
- Vendor subobject
- Sells item 1
- Sells item 2
- Sells item 3
- Sells item 4
- Has vendor
- Has vendor section
- Has vendor location
- Has item cost 1
- Has item cost 2
- Has item cost 3
- Has item cost 4
See also
- {{Vendor list result format}} - a similar template used by {{Vendor list}}.