[Zope] Retrieving a set number of entries

Chris Muldrow muldrow at ctwisp.net
Thu Oct 16 18:13:19 EDT 2003


It's easy to create some code that does this in Zope. Create a ZSQL 
method that does a select on your database. Then drag down the products 
menu and add a "Z Search Interface." It will prompt you for the name of 
a search document and a report document and will automagically create a 
results page that does just what you're looking to do. We use this as a 
quick and dirty way to write a search interface and then go hack up the 
code to make it look the way we want. The "size" attribute of the 
dtml-in tag of the results page is where you tweak how many you want on 
a page.
- Chris

On Thursday, October 16, 2003, at 04:37 PM, Lalo Castro wrote:

> Hi,
> 	I'm building a database interface in Zope.  We are using Zope 2.6, 
> Python 2.1.3, and the database is in PostGreSQL 7.3.3.  The problem I 
> am having is trying to search the database and return a set number of 
> entries. Like how Yahoo! returns 25 possibilities in it's search per 
> page.  Or how Google returns 10.  I'd like to know how to code it so 
> that a database search returns a set number of entries found, and can 
> make pages with multiple entries if there's more than the set number 
> of entries on a page.  Anyone have any ideas?
> -- 
> Lalo Castro
> Programmer/Analyst
> McHenry Library
> (831) 459-5208
>
>
> _______________________________________________
> Zope maillist  -  Zope at 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 )
>




More information about the Zope mailing list