25 Nov
2003
25 Nov
'03
9:13 p.m.
On Tue, Nov 25, 2003 at 09:52:51PM +0100, Andre Meyer wrote:
Hi Zopers
Another detail that bugs me: how can I translate the following dtml code to zpt. It colours table rows in grey/white alternatively. Is the zpt version below the only way? It is clearly very inelegant to repeat code.
Maybe not the most elegant, but it avoids the repetition: <table> <span tal:repeat="item here/listItems"> <tr bgcolor="lightgray" tal:attributes="bgcolor python:path('repeat/item/odd') and 'white' or default"> <td>...</td> </tr> </span> </table> -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's GANGSTA MERRY MAN! (random hero from isometric.spaceninja.com)