Fernando Lujan wrote:


I have a sql-method which returns a dinamic number of tuples. How can
I split it and show the result using a per page separation?

Something like Google's results when we have a huge number of results... ;)


Maybe try 'Z Search Interface' in ZMI from the Add list. It will generate simple zpt page with batched results. Unfortuantelly it only has next, previous links,
and no numbered links to page "1, 2, 3 ..." so if you need this then
I think you'll have to write something on your own.
Take care that the result is taken to the batch as a whole set from
database (speed!). It may be good idea to use slicing directly in database
queries (eg. 'limit' and 'offset' clauses in postgres) but then you'll have to
write a script that will manage this.

Maciej Wisniowski
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to