[Zope-dev] <dtml-in> how do I get count of records in sequence? (aka batch-size)

Michel Pelletier michel@digicool.com
Mon, 17 Apr 2000 11:00:18 -0700


Michel Pelletier wrote:
> 
> 
> Second, there is the python builtin function _.len() that you can use to
> determine the size of a sequence (untested)::
> 
>   <dtml-let sequence="whatever()">
>     <dtml-in sequence>
>       <dtml-if "_.len(sequence) == 1">
>         one
>       </dtml-in>
               ^^
>     </dtml-in>
>   </dtml-let>
 
Oops.

  <dtml-let sequence="whatever()">
    <dtml-in sequence>
      <dtml-if "_.len(sequence) == 1">
        one
      </dtml-if>
    </dtml-in>
  </dtml-let>

-Michel