Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!

Difference between revisions of "Template:Shop list row"

From DFO World Wiki
Jump to: navigation, search
m
m
 
(18 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{Shop list result format|<!--1-->|{{{item}}}|{{PAGENAME}}|{{#arraymap: {{{cost|}}}|,|@@@|{{#explode:@@@| |0}}|,}}|{{#arraymap: {{{cost|}}}|,|@@@|{{#sub:@@@|{{#pos:@@@| }}}}|,}}|{{{limit|}}}|<!-- availability -->}}{{#ifeq: {{{create subobject|}}} | n | <!-- don't create a subobj --> | {{#subobject:shopitem{{#vardefineecho:shopitemnumber|{{#expr:{{#var:shopitemnumber|-1}}+1}}}}
+
<includeonly>{{Shop list result format|<!--1-->|{{{item}}}|{{PAGENAME}}|{{#arraymap: {{{cost|}}}|;|@@@|{{#explode:@@@| |0}}|, <nowiki></nowiki>}}|{{#arraymap: {{{cost|}}}|;|@@@|{{#sub:@@@|{{#pos:@@@| }}}}|,}}|{{{limit|}}}|{{{clublevelreq|}}}|<!-- availability -->}}{{#if: {{NAMESPACE}} | <!-- don't create a subobj within namespace --> | {{#subobject:shopitem{{#vardefineecho:shopitemnumber|{{#expr:{{#var:shopitemnumber|-1}}+1}}}}
 
| Has seller = {{PAGENAME}}
 
| Has seller = {{PAGENAME}}
 
| Sells item = {{{item}}}
 
| Sells item = {{{item}}}
| Has purchase cost = {{#arraymap: {{{cost|}}}|,|@@@|{{#explode:@@@| |0}};{{#sub:@@@|{{#pos:@@@| }}}}|###}}|+sep=###
+
| Has purchase cost = {{#arraymap: {{{cost|}}}|;|@@@|{{#explode:@@@| |0}};{{#sub:@@@|{{#pos:@@@| }}}}|###}}|+sep=###
 +
<!--{{#arraymap: {{{cost|}}}|,|@@@|{{#explode:@@@| |0}};{{#sub:@@@|{{#pos:@@@| }}}}|###}}|+sep=###-->
 
| Has purchase limit = {{{limit|}}}
 
| Has purchase limit = {{{limit|}}}
 +
| Has club level purchase requirement = {{{clublevelreq|}}}
 
| Has availability status ={{#switch:{{lc:{{{status|}}}}}
 
| Has availability status ={{#switch:{{lc:{{{status|}}}}}
 
   | old | event | available = {{ucfirst:{{lc:{{{status}}}}}}}
 
   | old | event | available = {{ucfirst:{{lc:{{{status}}}}}}}
Line 19: Line 21:
 
* Has purchase cost  
 
* Has purchase cost  
 
* Has purchase limit
 
* Has purchase limit
 +
* Has club level purchase requirement
 
* Has availability status
 
* Has availability status
  
Line 26: Line 29:
 
| cost =  
 
| cost =  
 
| limit =  
 
| limit =  
 +
| clublevelreq =
 
| status =  
 
| status =  
| create subobject =
 
 
}}</pre>
 
}}</pre>
  
Line 35: Line 38:
  
 
; item : Page name of the item.
 
; item : Page name of the item.
; cost : Cost of the item. Expected format is quantity, followed by a space, followed by the wiki page of the currency. If multiple currencies are required for purchase, separate them with a comma.
+
; cost : Cost of the item. Expected format is quantity, followed by a space, followed by the wiki page of the currency. If multiple currencies are required for purchase, separate them with a semicolon.
 
; limit : Optional. The maximum number of times this item can be purchased.
 
; limit : Optional. The maximum number of times this item can be purchased.
 +
; clublevelreq : Optional. The Explorer Club level requirement for this item to be purchased.
 
; status : The availability status of the item in the shop. Set to ''event'' if the item is exclusively sold during events, or ''available'' if it is currently available in the shop. Defaults to ''available''.
 
; status : The availability status of the item in the shop. Set to ''event'' if the item is exclusively sold during events, or ''available'' if it is currently available in the shop. Defaults to ''available''.
; create subobject : Set to ''y'' to have the template create a subobject, ''n'' to create no subobject. If no subobject is created, the listed item cannot be found when querying for sellers. Defaults to ''y''.
 
  
 
[[Category:Formatting Templates]]
 
[[Category:Formatting Templates]]
 +
[[Category:Subobject Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 11:55, 5 November 2020

Description

This template creates a row for an item to manually create a list. Used in conjunction with Template:Shop list header. Uses Template:Shop list result format for formatting.

The template creates a subobject with the following properties:

  • Has seller
  • Sells item
  • Has purchase cost
  • Has purchase limit
  • Has club level purchase requirement
  • Has availability status

Usage

{{Shop list row
| item = 
| cost = 
| limit = 
| clublevelreq =
| status = 
}}

Parameters

All parameters are required unless stated otherwise.

item 
Page name of the item.
cost 
Cost of the item. Expected format is quantity, followed by a space, followed by the wiki page of the currency. If multiple currencies are required for purchase, separate them with a semicolon.
limit 
Optional. The maximum number of times this item can be purchased.
clublevelreq 
Optional. The Explorer Club level requirement for this item to be purchased.
status 
The availability status of the item in the shop. Set to event if the item is exclusively sold during events, or available if it is currently available in the shop. Defaults to available.