Template:Price/doc: Difference between revisions

Jump to navigation Jump to search
252 bytes added ,  22:05, 19 June 2023
Update documentation for showLabel and friendship
No edit summary
(Update documentation for showLabel and friendship)
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|moonstone}}
<pre>''{{price|50|friendship|showLabel}}''


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


{{Price|50|moonstone}}
''{{price|50|friendship|showLabel}}''


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


==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}}
|-
|moonstone
|[[File:Moonstone_icon.png|20px|link=]]
|-
|-
|dreamlight
|dreamlight
|[[File:Dreamlight.png|20px|link=]]
|{{price|1000|dreamlight|showLabel}}
|-
|-
|energy
|energy
|[[File:Energy.png|20px|link=]]
|{{price|1000|energy|showLabel}}
|-
|friendship
|{{price|1000|friendship|showLabel}}
|-
|moonstone
|{{price|1000|moonstone|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
|parkstoken
|[[File:Parks_Token.png|20px|link=Disney Parks Star Path]]
|{{price|1000|parkstoken|showLabel}}
|-
|-
|wonderpixartoken
|wonderpixartoken
|[[File:Wonder of Pixar_Token.png|20px|link=The Wonder of Pixar Star Path]]
|{{price|1000|wonderpixartoken|showLabel}}
|}
|}


<includeonly>[[Category:Formatting templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Formatting templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
moderator
28,292

edits

Navigation menu