Template:Price: Difference between revisions
Marblemadmax (talk | contribs) No edit summary |
Marblemadmax (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<span id="nametemplate" style="font-weight: bold;" class="no-wrap" data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true|{{#iferror:{{#expr:{{{1|0}}}>1}}|0|{{#expr:{{{1|}}}}}}}|{{{sortkey}}}}}}}">{{#iferror:{{#expr:{{{1|0}}}>1}}|{{{1|}}}|{{#switch:{{lc:{{{2|}}}}} | <includeonly><span id="nametemplate" style="font-weight: bold;" class="no-wrap" data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true|{{#iferror:{{#expr:{{{1|0}}}>1}}|0|{{#expr:{{{1|}}}}}}}|{{{sortkey}}}}}}}">{{#iferror:{{#expr:{{{1|0}}}>1}}|{{{1|}}}|{{#switch:{{lc:{{{2|}}}}} | ||
|pixartoken=[[File:Pixar Token_icon.png|20px|link=Pixar Fest Star Path]] {{formatnum:{{{1|}}}}} | |pixartoken=[[File:Pixar Token_icon.png|20px|link=Pixar Fest Star Path]] {{formatnum:{{{1|}}}}} | ||
|villaintoken=[[File:Villains_Token.png|20px|link=Villains' Star Path]] {{formatnum:{{{1|}}}}} | |villaintoken=[[File:Villains_Token.png|20px|link=Villains' Star Path]] {{formatnum:{{{1|}}}}} | ||
Line 6: | Line 6: | ||
|moonstone=[[File:Moonstone_icon.png|20px|link=]] {{formatnum:{{{1|}}}}} | |moonstone=[[File:Moonstone_icon.png|20px|link=]] {{formatnum:{{{1|}}}}} | ||
|dreamlight=[[File:Dreamlight.png|20px|link=]] [[Dreamlight|{{formatnum:{{{1|}}}}}]] | |dreamlight=[[File:Dreamlight.png|20px|link=]] [[Dreamlight|{{formatnum:{{{1|}}}}}]] | ||
|#default=[[File:Star_Coin_icon.png|20px|link=]] {{formatnum:{{#expr:{{{1|}}}}}}}}}}}</span><noinclude> | |#default=[[File:Star_Coin_icon.png|20px|link=]] {{formatnum:{{#expr:{{{1|}}}}}}}}}}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> |
Revision as of 12:36, 18 March 2023
Description
This template is used to insert a value and an icon corresponding to an item of value, usually currency, inline with text. It can be used both when the value is given to the player ("reward"), as well as when the value is at a cost to the player ("price").
Usage
In its most basic form, this template can be used by entering the following onto a relevant page:
{{price|<<amount>>}}
The amount should be provided as a simple number, with no commas or templates.
There are also optional parameters that can be used:
{{price|<<amount>>|<<currency>>|showLabel}}
If optional parameters are not provided, Star Coins will be used as the currency, and the label will not be displayed.
Examples
{{price|100}}
results in...
100
''{{price|50|friendship|showLabel}}''
results in...
50
{{price|30|wonderpixartoken}}
results in...
30
Amount
This parameter is the amount of currency displayed after the icon
Currency
This parameter accepts different currency types, and will default to Star Coin if there is no value added.
Event currency parameters will automatically link the generated image to the corresponding event article.
Input | Output (1000, showLabel) |
---|---|
1,000 | |
dreamlight | 1,000 |
energy | 1,000 |
friendship | 1,000 |
moonstone | 1,000 |
daisycoin | 1,000 |
pixeldust | 1,000 |
mist | 1,000 |
pixartoken | 1,000 |
villaintoken | 1,000 |
festivetoken | 1,000 |
centennialtoken | 1,000 |
parkstoken | 1,000 |
wonderpixartoken | 1,000 |
hauntedtoken | 1,000 |
royalwintertoken | 1,000 |
monstertoken | 1,000 |
dayatdisneytoken | 1,000 |