[Zope] total "hits" in dtml-in?
myzope@softhome.net
myzope@softhome.net
Tue, 16 Jul 2002 18:34:02 +0200
Sorry is this is a second posting
On 16 jul 2002, you wrote in ZopeList:
> I know I could do a len() of the query, but that
> seems like a bad idea because the database would essentially get queried
> twice - once to get the len, and once to create the <dtml-in> list.
Hope I'm not wrong, but i think this should cache 'yourquery' for the
<dtml-in>.
<dtml-let query_result=yourquery total="_.len(query_result)">
<dtml-in expr="query_result" size=x>
</dtml-in>
</dtml-let>
On the other hand, i'd be interested to know how you get results x and y in
'x to y of total'
cheers, Dirk