Opened 8 years ago

Closed 8 years ago

#7408 closed (invalid)

Example for cycle is incorrect.

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


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 Changed 8 years ago by mrts

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

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