[Zope-CMF] Help on catalog query
Florent Guillaume
fg@nuxeo.com
Sun, 17 Mar 2002 14:35:37 +0000 (UTC)
Andrew Sawyers <andrew@zope.com> wrote:
> If you just want to return back brains objects, the following worked for me
> in the debugger:
> types = ['ItemType1', 'ItemType2']
> catalog = root.portal.portal_catalog
> res = []
> for t in types:
> res.append(catalog(Type=t))
Ah, this reminds me: another weird thing IMHO in CMF, is that Type is
catalogged but Type is the human-readable version (the title). It
would be much better if Metatype (content_meta_type) was
catalogged. Also the allowed_content_types variable in a
TypeInformation contains this human-readable version, which means that
whenever you change the title you have to go through all your types
and reselect the new one in the "Allowed content types".
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com