Table of Contents
The apply
tag allows you to apply Aspect filters on a block of template data:
{% apply upper %}
This text becomes uppercase
{% endapply %}
{# outputs "THIS TEXT BECOMES UPPERCASE" #}
You can also chain filters and pass arguments to them:
{% apply lower|escape('html') %}
<strong>SOME TEXT</strong>
{% endapply %}
{# outputs "<strong>some text</strong>" #}
NOTE: The filter buffers the data. With a large amount of data processed by the filter, a large amount of RAM will be used.