[Twisted-web] nevow - alternating row colors?

Donovan Preston dp at ulaluma.com
Mon Aug 23 12:47:32 MDT 2004


On Aug 23, 2004, at 2:11 PM, angryhicKclown at netscape.net wrote:

> If I have a table, and I want the background colors to alternate, how 
> would I do that in Nevow?

You just supply multiple pattern nodes with the same name, and nevow 
will cycle through them when it is copying them. For example, if you 
are rendering a list of items in a table, you would supply more than 
one 'item' pattern node:

<table nevow:render="sequence" nevow:data="whatever">
     <tr nevow:pattern="item" style="background-color: blue"> ... </tr>
     <tr nevow:pattern="item" style="background-color: red"> ... </tr>
</table>

dp




More information about the Twisted-web mailing list