[Zope] Re: how to query multiple catalogs using search button?
Tres Seaver
tseaver at zope.com
Mon Sep 13 06:49:15 EDT 2004
vaibhav uprety wrote:
> Hi,
>
> I want to query two different
> catalogs,"portal_catalog" and a "ZCatalog" using the
> search button in plone.
>
> I want to give the user a drop down menu from which
> user will select a value and enter the searchableText
> in the input box . After this when the user clicks the
> "Search" button the concerned catalog should be
> queried and the results should be displayed to users.
>
> Please help me to tackle this issue!
##Script (Python) "alternate_search"
##title=Alternate catalog search
##parameters=catalog_name='portal_catalog',**kw
from Products.CMFCore.utils import getToolByName
catalog = getToolByName(context, catalog_name)
return catalog.searchResults(**kw)
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope
mailing list