If i want specific template to stop from rendering anything, I use if
:
{% if something %}
HTML markup...
{% endif %}
This however requires wrapping whole Template in if
which is not ideal for readbility.
Is there maybe some kind of Twig function which when used stops rendering template in which it is used? Like this:
{% if something %}
{% do stopRendering() %}
{% endif %}
HTML markup (will show up if we didnt stopped rendering)...