[Zope] re: Length of results set
Dylan Reinhardt
Dylan@DylanReinhardt.com
Thu, 16 Jan 2003 10:35:13 -0800
Oh, sorry... I think I figured out what you're after...
Try:
<dtml-call "REQUEST.set('my_langs', [])">
<dtml-let langShort="lang[2:]">
<dtml-in objectValues>
<dtml-if "id==langShort">
<dtml-call "my_langs.append(langShort)">
</dtml-if>
</dtml-in>
</dtml-let>
You found <dtml-var "_.len(my_langs)"> matches: <UL>
<dtml-in my_langs>
<LI><dtml-var sequence-item></LI>
</dtml-in>
</UL>
Does *that* do it?
Sorry about the last post...
Dylan
At 09:54 AM 1/16/2003, you wrote:
>Dylan, thanks for trying...
>
> >It's _.len() not ._len()
>
>Right of course, sorry for the typo.
>
>It's not the total sequence-length that I am after, rather the number of
>matches found by a <dtml-if> nested in a <dtml-in>.
>
> > <dtml-let lang="REQUEST.get('HTTP_ACCEPT_LANGUAGE','en-us')">
> > <dtml-in objectValues>
> > <dtml-let folder=id>
> > <dtml-let langShort=lang[2:]>
> > <dtml-var langShort>
> > <dtml-if expr="folder==lang">
> > <dtml-var lang> <---------- how many of these?
> > </dtml-if> (there could be several)
> > </dtml-let>
> > </dtml-let>
> > </dtml-in>
> > </dtml-let>
>
>I've indicated above the number I'm after.
>
>Sorry if I was unclear.
>
>New ideas?
>
>Thanks, Ken
>
>
>
>
>
>
>_______________________________________________
>Zope maillist - Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )