[Zope] Question about "tal:condition"

Arjan Huijzer huijzer72@yahoo.com
Thu, 13 Feb 2003 12:20:59 -0800 (PST)


Hi,

I have a question about the usage of the tal:condition
statement. In the code I have included I generate a
table with two types of rows that have a different
value for the class attribute (located in the <td>
tag). It seems to me that this code can be much
shorter by using only one <td> block. How can I
accomplish this? 

Thanks in advance!!
Arjan Huijzer

------------------------------------

<table>
  <tbody>
    <tr tal:repeat="link container/objectValues">
        <td tal:condition="repeat/link/odd"
            class="lb">
          <a tal:content="link/title"
             tal:attributes="href link/url"
             href="link.html" 
             target="_new">Link Title</a>
        </td>
        <td tal:condition="repeat/link/even"
          <a tal:content="link/title"
             tal:attributes="href link/url"
             href="link.html" 
             target="_new">Link Title</a>
        </td>
    </tr>
  </tbody>
</table>

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com