[Zope-CMF] context specific catalog searches

Andrew Sawyers andrew@zope.com
Mon, 3 Dec 2001 13:17:37 -0500


The ZMI display has a bug; there's actually a path catalog, but that display
view always shows none.
Here is an example of using path in a catalog query (ZPT version):
items python: here.portal_catalog(Type='Document'
                                , path=here.absolute_url(1)
                                , sort_on='created'
                                , sort_order='reverse'
                                 );
If you are using dtml, you should be able to take this example and apply it
to your dtml...
Hope this helps.
Andrew

-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of Ivo van der Wijk
Sent: Monday, December 03, 2001 10:41 AM
To: zope-cmf@zope.org
Subject: [Zope-CMF] context specific catalog searches


Hi,

I'm trying to find objects in the portal catalog that are located in/under
the current context (folder), i.e. a dtml script 'list_news' in the cmf
root which is included in several dtml documents in subfolders to list the
news items in these folders (but not in other folders).

I don't seem to be able to get this to work. I know portal_catalog has a
path index - how can I access this? If I select an object from 'Find
Objects',
I always get 'None' as path in the 'Index Contents' section.

Matching on id won't work either, as this does not give the entire path of
the
object.

I'm not looking for an object{Items,Ids,Values} solution here - I wish to
use the ZCatalog.

With regards,

	Ivo

--
Drs. I.R. van der Wijk                              -=-
Brouwersgracht 132                      Amaze Internet Services V.O.F.
1013 HA Amsterdam, NL                               -=-
Tel: +31-20-4688336                       Linux/Web/Zope/SQL/MMBase
Fax: +31-20-4688337                           Network Solutions
Web:     http://www.amaze.nl/                    Consultancy
Email:   ivo@amaze.nl                               -=-

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests