Opened 6 years ago

Closed 6 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:

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 Changed 6 years ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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