[Zope] Simple DTML question

Jonathan Hobbs toolkit at magma.ca
Fri Aug 27 14:39:11 EDT 2004


----- Original Message ----- 
From: <hpinson at indepthl.com>
> I have a legacy site that uses dtml mostly.  I'm having brainlock 
> here.
> 
> Why does this not work?
> 
> <dtml-if sequence-start>
>   Show records.
> <dtml-else>
>    No records returned.
> </dtml-if>
> 
> Can anyone provide the proper syntax?

What are you trying to accomplish?

Typically the format is:

<dtml-in ....>
  <dtml-if sequence-start>
    ...do something on the first loop iteration
  </dtml-if>

  ...do something for each iteration

  <dtml-if sequence-end>
    ...do something on the last loop iteration
  </dtml-if>

<dtml-else>
  ...do something if the dtml-in loop did not execute at least once
</dtml-in>


HTH

Jonathan




More information about the Zope mailing list