{% for X in L %}{% ifequal X 3 %}{% cycle as foo %}{% endifequal %}{% cycle "A" "B" "C" "D" "E" "F" "G" as foo %}{% endfor %}