twig if statement check value is 1 code example
Example 1: twig if statement
{% if temperature > 18 and temperature < 27 %}
It's a nice day for a walk in the park.
{% endif %}
Example 2: twig if
{% if not user.subscribed %}
You are not subscribed to our mailing list.
{% endif %}