Twig – Snippets

https://twig.symfony.com/doc/3.x

apply

{# base.inky.twig #}

{% apply inky_to_html | inline_css(
            source('@public/vendor/inky/css/inky.css'),
            source( 'base.email.css' ),
        )
%}

...
https://twig.symfony.com/doc/3.x/tags/apply.html

if

{% if temperature > 18 and temperature < 27 %}
    ...
{% endif %}
{% if obj1 == obj2 %}
    ...
{% endif %}
https://twig.symfony.com/doc/3.x/tags/if.html

Tests

constant
defined
divisibleby
empty
even
iterable
null
odd
sameas
https://twig.symfony.com/doc/3.x/

debug

{{ dump( foo ) }}
https://twig.symfony.com/doc/3.x/