Maybe something like: <table> <tr tal:define="subfolders python:container.objectValues('Folder')"> <span tal:repeat="folder subfolders" tal:omit-tag=""> <td tal:attributes="bgcolor python:('yellow','red')[here is folder]" tal:content="folder/title> Title </td> </span> </tr> </table> It relies on the fact the "here is folder" always returns either a 1 or a 0 hth, Casey On Monday 29 April 2002 03:13 pm, Tom Nixon allegedly wrote:
I am using this code to generate a navigation bar. I need to have a different bgcolor attribute on the td if we're already in that folder. In other words, I need to do tal:attributes="bgcolor string:red" but only where folder == here. The condition only applies to the bgcolor attribute so I'm not sure where it goes. Any ideas?
<table> <tr tal:define="subfolders python:container.objectValues('Folder')"> <td tal:repeat="folder subfolders" bgcolor="yellow"> <span tal:replace="folder/title">Title</span> </td> </tr> </table>
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )