[Zope-CMF] New Portal types question

Lalo Martins lalo@laranja.org
Wed, 3 Apr 2002 00:13:28 -0300

On Tue, Apr 02, 2002 at 06:40:31PM -0500, Kevin Carlson wrote:
> I changed the default skin to iterate over items of type "XYZ" instead of
> type "Portal Folder" and nothing is displayed.  If I am reading the
> documentation correctly it says that the expression "objectValues" takes as
> its argument a meta-type, however, "XYZ" never returns anything.  If I
> change the dtml-in statement back to "Portal Folder", the objects, and many
> others are also returned.  Example:
> The statement below returns nothing
> <dtml-in expr="objectValues('XYZ')" sort="Title">
> This one returns 'XYZ' and others
> <dtml-in expr="objectValues('Portal Folder')" sort="Title">

(Sorry, not a sollution, but an explanation of the problem)

objectValues filters on Zope meta-types, which are not the same as CMF
Metatypes. You'd have to filter by Zope meta-types and then filter again,

The "Right", CMFish way to do that would be to query the Catalog, using type
and path as indexes. If you don't know how to do that, write back and I'll
post a few snippets tomorrow when I have access to them.

  It doesn't bother me that people say things like
   "you'll never get anywhere with this attitude".
   In a few decades, it will make a good paragraph
      in my biography. You know, for a laugh.
http://www.laranja.org/                mailto:lalo@laranja.org
         pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)      ---       http://www.BroDar.org/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/