Templating filters
Website personalisation: Templating
Filters are used to modify the output of numbers, strings, objects, and variables.
They are placed inside an output tag {{ }}
, and are denoted by a pipe character |
.
Money
This filter formats the price based on the localisation settings and currency selected by the user.
<span>{{ 1234.56 | money }}</span>
Examples for how this might be rendered for different localisation settings:
<!-- for GBP -->
<span>£1,234.56</span>
<!-- for USD -->
<span>$1,234.56</span>
<!-- for EUR (fr-FR) -->
<span>1 234,56 €</span>
<!-- for EUR (es-ES) -->
<span>1.234,56 €</span>
<!-- for EUR (en-IE) -->
<span>€1,234.56</span>
<!-- for JPY -->
<span>¥1,235</span>
<!-- for BHT -->
<span>THB1,234.56</span>
Updated 2 days ago