[Zope] tal:repeat

Tom Nixon tom.nixon@aim23.com
Mon, 29 Apr 2002 20:13:15 +0100


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>