I try to do zebra striping:
{% set counter = 0 %}
{% for entity in entities %}
<tr class="{{ cycle(['odd', 'even'], counter) }}">
{% counter++ %}
but I am getting error:
Unexpected tag name "counter" (expecting closing tag for the "for" tag defined near line 11)
Could somebody give me solution?
[EDIT]
My bad solution is so easy:
{% set counter = counter + 1 %}