Opened 15 years ago

Closed 15 years ago

#6469 closed (wontfix)

add 'even' to forloop in template/

Reported by: shane@… Owned by: nobody
Component: Template system Version: 0.96
Severity: Keywords: even, forloop
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


It would be nice to know when a counter is even or not

--- template/ 2007-10-26 11:21:36.000000000 -0800
+++ /tmp/ 2008-01-26 10:46:06.000000000 -0900
@@ -115,6 +115,7 @@

# boolean values designating first and last times through loop
'first': (i == 0),
'last': (i == len_values - 1),

+ 'even': (i % 2 == 0)

'parentloop': parentloop,

context[self.loopvar] = item

Change History (2)

comment:1 Changed 15 years ago by Shane R. Spencer <shane@…>

Keywords: forloop added; number removed

comment:2 Changed 15 years ago by Matt McClanahan

Resolution: wontfix
Status: newclosed

There are a handful of options for this, such as the cycle tag and the divisibleby filter.

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