{% if exist is same as(true) %} {% for work in works %} {% endfor %} {% else %} {% if task is not null %} {% endif %} {% for work in works %} {% endfor %} {% endif %}