Ah I see! Thanks guys I might just stick with enumerator, it's no
longer hand than creating a cycle iterator from the looks of it.
On Nov 1, 5:15 pm, "Karl Guertin" <[EMAIL PROTECTED]> wrote:
> On 11/1/06, Richard (koorb) <[EMAIL PROTECTED]> wrote:
>
> > I also tried ${tg.cycle(('odd','even'))} (without .value) But I only
> > get "None" or "odd" ?You have to create it before you use it and call
> > next():
>
> <?python OddEven = tg.cycle(('odd','even')) ?>
> <tr py:for="item in item_list" class="OddEven.next()">
> <td>${item.name}</td>
> <td>${OddEven}</td>
> </tr>
>
> The ${OddEven} in the td will print 'odd' or 'even' without advancing
> the iterator.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---