[Zope] R: [Zope] dtmll-in variables

Marcel Preda marcel@punto.it
Thu, 8 Jun 2000 17:48:37 +0200


> 
> <dtml-in linescontributed>
> line:<dtml-var content><br>
> <dtml-var sequence-length><br>
> <dtml-if "sequence-length == 10">
> WHOOP WHOOP
> </dtml-if>
> </dtml-in>
> 
> There are ten lines returned by this query but zope sees the line:
> 
> <dtml-if "sequence-length == 10">
> 
> and thinks I am trying to say sequence minus length,
> rather than refer to the dtml var sequence-length
> 

<dtml-if "_['sequence-length'] == 10">



But maybe is better to use:
<dtml-if "_.len(linescontributed)==10">
  <dtml-in...>
  ...
  ...
</dtml-if>
This must be faster, I suppose...

PM