]>
Commit | Line | Data |
---|---|---|
4f5b44bd NL |
1 | ``filter`` |
2 | ========== | |
3 | ||
4 | Filter sections allow you to apply regular Twig filters on a block of template | |
5 | data. Just wrap the code in the special ``filter`` section: | |
6 | ||
7 | .. code-block:: jinja | |
8 | ||
9 | {% filter upper %} | |
10 | This text becomes uppercase | |
11 | {% endfilter %} | |
12 | ||
13 | You can also chain filters: | |
14 | ||
15 | .. code-block:: jinja | |
16 | ||
17 | {% filter lower|escape %} | |
18 | <strong>SOME TEXT</strong> | |
19 | {% endfilter %} | |
20 | ||
21 | {# outputs "<strong>some text</strong>" #} |