Code

Opened 4 years ago

Closed 4 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>

Attachments (0)

Change History (1)

comment:1 Changed 4 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.