Showing the results per pages.
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. -- Fernando Lujan
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
--On 1. August 2005 17:31:11 -0300 Fernando Lujan <flujan@gmail.com> 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
participants (3)
-
Andreas Jung -
Fernando Lujan -
Maciej Wisniowski