[Zope] ZCatalog counting?
Rik Hoekstra
rik.hoekstra@inghist.nl
Tue, 27 Jun 2000 22:16:31 +0200
>A presumably simple question:
>
>Is there an easy way to count the number of occurences of a certain meta
>type in a Catalog? E.g: I want a dtml snippet that outputs:
>
>There are 123 DTML Documents in the Catalog.
>
>I've browsed the howto's, but didn't find anything like this. Can anybody
>offer me some assistance?
>
>
To quote a mail by RD Murray from a gew days ago:
How do I find the size of the results returned by the catalog?
<dtml-let results=Catalog(....)>
<dtml-var "_.len(results)"> <-- the results' length -->
</dtml-let>
Also at the zdp site:
http://zdp.zope.org/projects/zsnippet/snippets/DTMLContent/CatalogResLength
Rik