Currency
Docs > Extensions > Plugins > CurrencyHere is a simply little script used to convert numbers into a currency format. To use it, enable it sidewide or on specific pages as desired by adding this line to your site.config file:
enableCurrency
To use it, put a function like this on your page:
<(currency 100)> | $100.00 | |
<(currency 3.1415926)> | $3.14 | |
<(currency $1000)> | $1000.00 | |
<(currency 37 symbol=£)> | £37.00 | |
<(currency €73 symbol=€)> | €73.00 |
This is especially useful if you are not sure whether or not there is a currency denominator preceding the amount.
Not there is also a reverse function, where you can put fmt=number to an amount with a currency symbol and the currency will be stripped away.
<(currency $100 fmt=number)> | 100 |