Yaffs site version 1.1
[yaffs-website] / vendor / twig / twig / doc / tags / filter.rst
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 "&lt;strong&gt;some text&lt;/strong&gt;" #}