Can a Jinja variable’s scope extend beyond in an inner block?
One way around this limitation is to enable the “do” expression-statement extension and use an array instead of boolean: {% set exists = [] %} {% for i in range(5) %} {% if True %} {% do exists.append(1) %} {% endif %} {% endfor %} {% if exists %} <!– exists is true –> {% … Read more