blob: 27f25f918cd5266f276b8e723b1b7b0a6a22303e [file] [log] [blame]
``apply``
=========
The ``apply`` tag allows you to apply Twig filters on a block of template data:
.. code-block:: twig
{% apply upper %}
This text becomes uppercase
{% endapply %}
You can also chain filters and pass arguments to them:
.. code-block:: html+twig
{% apply lower|escape('html') %}
<strong>SOME TEXT</strong>
{% endapply %}
{# outputs "&lt;strong&gt;some text&lt;/strong&gt;" #}