HI all,
in a FOR loop with optional if condition, loop.index is incremented even if the condition fails. For example:
{% for el in elements if el.someCheck()%}
{% if not loop.first %}, {% endif %} {{el}}
{% endfor %}
If the first el check fails, skipping the cicle, VOLT will print the comma before the first printed element even if it is the really first executed cicle. I've looked around the documentation but no alternative index is provided to check the iteration position considering the condition.
Any ideas? Thanks