[Zope] Help with Z Search Interface and ranges
Jeff Rush
Jeff Rush" <jrush@timecastle.net
Mon, 15 Nov 99 22:23:32 -0500
Take a look at:
http://www.zope.org/SiteIndex/newitems.html/view_source
where zope.org uses a lower-range on the date field to show all items
new within a recent interval of time. The key is to append a '_usage'
string to the name of the field you wish to bracket.
<!--#call "REQUEST.set('date_usage','range:min')"-->
<!--#call "REQUEST.set('date', ZopeTime().earliestTime()-1)"-->
In your case, you'd use both a min and a max:
<!--#call "REQUEST.set('price_usage','range:min:max')"-->
<!--#call "REQUEST.set('price', [10000, 15000])"-->
I can't remember whether the range is inclusive or not i.e.
whether it represents >= or just >.
-Jeff Rush
On Mon, 15 Nov 1999 21:44:16 -0600, Willie Peloquin wrote:
>Could someone point me to an example of a Z Search Interface that will allow
>me to search for instances with less than or greater than type values: ie.
>
>price between 10000 and 15000
>price >= 10000 and price <= 15000