Filters

Filters help you modify the data.


Filters can be used within the output tag and are denoted with by a pipe character |. Filters are applied from left to right. Below is an example of how filters can be used.

Input

{{ 2 | plus: 5 | times: 10}}

Output

70

Here we used a plus and times filters which required a parameter to be given. There are also filters that do not take parameters such as upcase which transforms all the letters in the text to uppercase. Filter arguments can also be named and come in handy when using the translation filter t.

Input

{{ "sold_out" | t: title: product.title }}