[Zope] dtml-let

Alejandro Fernandez ale@e-group.org
Thu, 11 Jul 2002 15:42:44 +0200


Hi,

I'm trying to output a table using dtml-in, that shows a certain number of
rows in that table, then adds up the rows not shown, and shows an "other
values" row, and finally shows totals for all the data in the table.

So the output would be something like this:

Language  Requests  Uniques Sessions     Percent     Time to Load
   it     92384     293       231         56.1%          3.0   
   fr     51563     65487     21          31.3%          1.0
   de     9834      9648       521         6.0%          3.2

[Other] 1   5416     25163     31          3.3%          0.0   
Total:     164653     101245     354935    100%          1.44


The dtml I'd like to use would be something like this:

dtml-let "set all variables to zero"
   dtml-in the request
       dtml-if sequence-number <= floor
           output a row with data
       dtml-else
           dtml-let "add up "other values" data using variables set at
top"
       dtml-if sequence-end
           output "other values" row
           output "totals" row
       /dtml-let 
   /dtml-in
/dtml-let

But dtml-let is zeroing the variables each iteration. Is there a better
way to do what I'm trying to do?

Thanks,

Ale

-- 
Alejandro Fernandez
Electronic Group Interactive
--+34-65-232-8086--