Answer the question
In order to leave comments, you need to log in
Render blocks in a specific order?
in the resulting html my-div1 should appear before my-div2
but it may also not appear if {% set flag = false %} is assigned in the process of some complex logic
how can this be achieved tell me
{% set flag = false %}
{% if flag %}
<div class=“my-div1”>
bla bla bla
</div>
{% endif %}
{% for a in arr %}
…. куча сложной тяжелой логики
<div class=“my-div2”></div>
{% set flag = true %}
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question