{% for i in list %} <li class="{% cycle 'one' 'two' %}"> ... </li> {% endfor %}
2 explanations
JackD
Produces one of its arguments each time this tag is encountered. The first argument is produced on the first encounter, the second argument on the second encounter, and so forth. Once all arguments are exhausted, the tag cycles to the first argument and produces it again.
0
JackD
Also to mention same value later:
{% cycle 'row1' 'row2' as rowcolors %}
and now use 'rowcolors'.
JackD
JackD