Re: [Zope] Showing the results per pages.

2005-08-01 Thread Andreas Jung



--On 1. August 2005 17:31:11 -0300 Fernando Lujan <[EMAIL PROTECTED]> wrote:


HI,

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?



The PloneBatch module from can be re-used *outside* Plone for doing such 
batching. Google or look on plone.org for details (yes, there is a 
documentation on PloneBatch on plone.org).


-aj

pgpd5Upc0GAiR.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Showing the results per pages.

2005-08-01 Thread Maciej Wisniowski

Fernando Lujan wrote:


HI,

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... ;)

Thanks.

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
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )