Opened 9 years ago

Closed 9 years ago

#12310 closed (invalid)

Error in "cycle" template tag example

Reported by: sebastien.ramage@… Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


the documentation say that we can use the cycle tag like this :

{% cycle 'row1' 'row2' as rowcolors %}


<tr class="{% cycle rowcolors %}">...</tr>
<tr class="{% cycle rowcolors %}">...</tr>

but the correct use is :

<tr class="{{ rowcolors }}">...</tr>
<tr class="{{ rowcolors }}">...</tr>

Change History (1)

comment:1 Changed 9 years ago by Tim Graham

Resolution: invalid
Status: newclosed

When I try the incantation you provided I always get the first item in the list. The way it is documented works for me. Note that the syntax you provided is for using the cycle tag outside a loop.

Note: See TracTickets for help on using tickets.
Back to Top