Opened 17 years ago

Closed 17 years ago

#7408 closed (invalid)

Example for cycle is incorrect.

Reported by: Richard Bell <rbell01824@…> Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords: Cycle
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It currently reads:

<tr class="{% cycle 'row1' 'row2' rowvar as rowcolors %}">...</tr>
<tr class="{% cycle rowcolors %}">...</tr>
<tr class="{% cycle rowcolors %}">...</tr>

But use of rowvar generates an error. It should probably read:

<tr class="{% cycle 'row1' 'row2' as rowcolors %}">...</tr>
<tr class="{% cycle rowcolors %}">...</tr>
<tr class="{% cycle rowcolors %}">...</tr>

Which does not generate an error and works properly.

Change History (1)

comment:1 by mrts, 17 years ago

Resolution: invalid
Status: newclosed

rowvar illustrates the use of a context variable in the cycle tag. You probably got an error as your template context did not include a variable labeled rowvar.

As such the example is both correct and illustrative, closing this ticket as invalid.

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