blob: 27f25f918cd5266f276b8e723b1b7b0a6a22303e [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001``apply``
2=========
3
4The ``apply`` tag allows you to apply Twig filters on a block of template data:
5
6.. code-block:: twig
7
8 {% apply upper %}
9 This text becomes uppercase
10 {% endapply %}
11
12You can also chain filters and pass arguments to them:
13
14.. code-block:: html+twig
15
16 {% apply lower|escape('html') %}
17 <strong>SOME TEXT</strong>
18 {% endapply %}
19
20 {# outputs "&lt;strong&gt;some text&lt;/strong&gt;" #}