Opened 16 years ago
Closed 16 years ago
#7408 closed (invalid)
Example for cycle is incorrect.
Reported by: | 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.
Note:
See TracTickets
for help on using tickets.
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 labeledrowvar
.As such the example is both correct and illustrative, closing this ticket as invalid.