[ZPT] Conditional attributes in TAL?
Chris Withers
lists at simplistix.co.uk
Tue Mar 2 10:01:09 EST 2004
Ian Bicking wrote:
> Try:
>
> <tr tal:attributes="class python: test(repeat['pc'].even(), 'evenrow',
> 'oddrow')">...
...and if you're clever about what you call your css classes, you can even get
ti down to:
<tr tal:attributes="class string:${pc/even}row"/>
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the ZPT
mailing list