All you have to do is override "templates/sequence.pt" and pass the "repeat"
variable through rndr. The exact line you'll have to edit is this one:

    <div tal:repeat="tup subfields" tal:replace="structure rndr(item_tmpl,
field=tup[1], cstruct=tup[0], parent=field) "/>

Here you can pass any variable (in your case, repeat=repeat.tup) down to
"templates/sequence_item.pt", which you can also override and set the
alternate backgrounds styles on each "sequence row".

2011/9/12 Bobby <bobby.chamber...@gmail.com>

> I could not find anything on alternate row colors in the deform docs.
> I know chameleon uses a variable named "repeat" to achieve this
> functionality, but this variable does not seem to be available in the
> scope of the template. However there is available a variable named
> "counter". I could use "counter" to write some modulo division to
> figure out if the row is odd or even. Ideally I could just use the
> chameleon variable which is already prepared. How would I make the
> "repeat" variable available? OR, should I just stick to using
> "counter" and some logic?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-discuss+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to