Thomas G. Apostolou wrote:
    <dtml-in expr="GetData(sysDSN=sysDSN, usr=usr, mypass=mypass,
sTable=sTable, sFields=sFields)">
      <dtml-if sequence-even>
        <tr class="even">
      <dtml-else>
        <tr class="odd">
      </dtml-if>
      <dtml-in sequence-item>
        <td><dtml-var sequence-item> </td>
      </dtml-in>
      </tr>
    </dtml-in>


What Tino said about using a database adapter is true, but even if you want to stick with your external method, you can always use the following ZPT:

<tr tal:repeat="data python:GetData(sysDSN=sysDSN,
                                    usr=usr,
                                    mypass=mypass,
                                    sTable=sTable,
                                    sFields=sFields)"
    tal:attributes="python:test(path('repeat/data/odd'),'odd','even')"
  <td tal:repeat="cell data"
      tal:content="cell">
  </td>
</tr>

You only need to figure out where sysDSN, usr, mypass, sTable and sFields come from. Your example being in DTML, I have no idea ;-)

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to