Questions tagged [cycle]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
2answers
70 views

using cycle with unknown number of entries

I'm using cycle to open and close a div for a row of content. It works great when there are more than a certain number of entries - in this case 4, but doesn't work when there are fewer than that. Is ...
3
votes
1answer
184 views

Cycle outputs plain text, should be html

Is this normal behavior? {% for entry in entries %} {{ cycle(['<div></div>', '2', '3', '4'], loop.index0) }} {% endfor %} Results in: &lt;div&gt;&lt;/div&gt; 2 3 4 ...
1
vote
1answer
504 views

Cycle tag - last cycle returns same cycle

I have this code: {% for entry in craft.entries.section('gigs') %} <h2 class="{{ cycle(['odd','even'], loop.index0) }}">{{ entry.title }}</h2> {% endfor %} This returns the same ...