[Zope] Re: incrementing variables in ZOPE

Maik Jablonski maik.jablonski@uni-bielefeld.de
Mon, 09 Sep 2002 14:06:25 +0200


michael.taņag wrote:
> hi! 
> I have this DTML problem, I want to display the contents of a
> particular folder in tabular form. say 5 columns by x rows. I once did
> this table display using incrementing counters on PHP, but I can't find
> its equivalent in Zope(I'm new to Zope and dtml). Can you guys help me.
> some ideas would really help. THANKS!!

maybe this will give you an idea...

<table>
  <dtml-in objectValues>
   <dtml-if "_['sequence-index'] % 5 == 0">
    <dtml-if sequence-even><tr bgcolor="#d0d0d0"><dtml-else><tr></dtml-if>
   </dtml-if>
   <td><a href="<dtml-var absolute_url>"><dtml-var id></a></td>
   <dtml-if "_['sequence-index'] % 5 == 4">
    </tr>
   </dtml-if>
  </dtml-in>
</table>

cheers, maik