Opened 15 years ago

Closed 15 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: no UI/UX: no

Description

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

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

then

<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 by Tim Graham, 15 years ago

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