Template:Price/doc: Difference between revisions

m
no edit summary
mNo edit summary
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
==Description==
This template is used to insert a [[currency]] icon in-line with text.
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").


In addition to star coins, it supports displaying premium and event currency as well.
==Usage==
In its most basic form, this template can be used by entering the following onto a relevant page:


==Usage==
<pre>{{price|<<amount>>}}</pre>
This template can be used by entering the following onto a relevant page.


<pre>{{Price|''amount''}}</pre>
The amount should be provided as a simple number, with no commas or templates.


By default star coins are displayed, to use an another currency type add the appropriate name.
There are also optional parameters that can be used:
<pre>{{price|<<amount>>|<<currency>>|showLabel}}</pre>


<pre>{{Price|''amount''|''currency''}}</pre>
If optional parameters are not provided, Star Coins will be used as the currency, and the label will not be displayed.


===Examples===
==Examples==
<pre>{{Price|100}}</pre>
<pre>{{price|100}}</pre>
results in...
results in...


{{Price|100}}
{{price|100}}
 
<pre>''{{price|50|friendship|showLabel}}''</pre>
results in...


<pre>{{Price|50|moonstone}}
''{{price|50|friendship|showLabel}}''


{{Price|30|pixartoken}}
<pre>{{price|30|wonderpixartoken}}</pre>
</pre>
results in...
results in...


{{Price|50|moonstone}}
{{price|30|wonderpixartoken}}
 
{{Price|30|pixartoken}}


==Amount==
==Amount==
Line 39: Line 41:
{|class=wikitable
{|class=wikitable
!Input
!Input
!Output
!Output (1000, showLabel)
|-
|-
|
|
|[[File:Star_Coin_icon.png|20px|link=]]
|{{price|1000|showLabel}}
|-
|dreamlight
|{{price|1000|dreamlight|showLabel}}
|-
|energy
|{{price|1000|energy|showLabel}}
|-
|friendship
|{{price|1000|friendship|showLabel}}
|-
|-
|moonstone
|moonstone
|[[File:Moonstone_icon.png|20px|link=]]
|{{price|1000|moonstone|showLabel}}
|-
|-
|dreamlight
|daisycoin
|[[File:Dreamlight.png|20px|link=]]
|{{price|1000|daisycoin|showLabel}}
|-
|pixeldust
|{{price|1000|pixeldust|showLabel}}
|-
|mist
|{{price|1000|mist|showLabel}}
|-
|-
|pixartoken
|pixartoken
|[[File:Pixar Token_icon.png|20px|link=Pixar Fest Star Path]]
|{{price|1000|pixartoken|showLabel}}
|-
|-
|villaintoken
|villaintoken
|[[File:Villains_Token.png|20px|link=Villains' Star Path]]
|{{price|1000|villaintoken|showLabel}}
|-
|-
|festivetoken
|festivetoken
|[[File:Festive_Token.png|20px|link=Festive Star Path]]
|{{price|1000|festivetoken|showLabel}}
|-
|-
|centennialtoken
|centennialtoken
|[[File:Centennial_Token.png|20px|link=Centennial Star Path]]
|{{price|1000|centennialtoken|showLabel}}
|-
|parkstoken
|{{price|1000|parkstoken|showLabel}}
|-
|wonderpixartoken
|{{price|1000|wonderpixartoken|showLabel}}
|-
|hauntedtoken
|{{price|1000|hauntedtoken|showLabel}}
|-
|royalwintertoken
|{{price|1000|royalwintertoken|showLabel}}
|-
|monstertoken
|{{price|1000|monstertoken|showLabel}}
|-
|dayatdisneytoken
|{{price|1000|dayatdisneytoken|showLabel}}
|}
|}


<includeonly>[[Category:Formatting templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Formatting templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>