[Zope] Alternate row shading
Paul Winkler
pw_lists at slinkp.com
Wed Jun 9 21:15:09 EDT 2004
On Wed, Jun 09, 2004 at 05:31:40PM -0600, Steve Jibson wrote:
> I think I've found a way to make it work similarly using ZPT, but it's a
> hack at best, and it's very ugly:
>
> <table>
> <tr tal:repeat="item container/objectValues"
> tal:attributes="bgcolor python:(repeat['item'].even()
> and '#EEEEEE') or None">
> <td tal:content="repeat/item/number">#</td>
(snip)
FYI, I've recently been using a slight variant of this technique.
<span tal:omit-tag=""
tal:repeat="item container/objectValues">
<tr style="background-color: #EEEEEE"
tal:define="do_shade repeat/item/even"
tal:attributes="style python:do_shade and default or None">
...
--
Paul Winkler
http://www.slinkp.com
More information about the Zope
mailing list