[Zope] Re: convert python to dtml

Josef Meile jmeile@hotmail.com
Mon, 21 Jul 2003 17:49:16 +0200


> Why do you want to recode into DTML? I think that is piece of good code
and
> much faster than DTML.
Yes, that's a good question and I'm wondering too. Anyway, your code could
be
written shorter and nicer.

You don't have to use "rownum" to count the rows. This lines of code:

<dtml-call "REQUEST.set(rownum,1)"
<dtml-in recordset>
  Row <dtml-var rownum>, check <drml-var sequence-item><br>
  <dtml-call "REQUEST.set(rownum,rownum+1)"
</dtml-in>

can be replaced by:
<dtml-in recordset>
  Row <dtml-var "_['sequence-number']">, check <drml-var sequence-item><br>
</dtml-in>

Regards,
Josef