Yeah, it is annoying, but you can often define a namespace and use that.
{% set ns = namespace(counter=0) %}
{% for x in y %}
{% ns.counter=ns.counter+1 %}
{% end %}
{{ ns.counter }}
Yeah, it is annoying, but you can often define a namespace and use that.
{% set ns = namespace(counter=0) %}
{% for x in y %}
{% ns.counter=ns.counter+1 %}
{% end %}
{{ ns.counter }}