[Zope-CMF] New Portal types question

Kevin Carlson khcarlso@bellsouth.net
Wed, 3 Apr 2002 08:25:26 -0500

Hi Andrew,

This gives me an error -- perhaps I'm not understanding the context of the
call correctly.  I've tried:

<dtml-in expr="contentValues(Filter={'Type': ('XYZ',)})" sort="Title">


<dtml-in expr="objectValues('XYZ')" contentValues(Filter={'Type': ('XYZ',)})

the first of which throws an error on view and the second throws an error on
save.  Searched the help files and zope.org for "contentValues" and nothing
turned up.  What am I doing wrong?


-----Original Message-----
From: Andrew Sawyers [mailto:andrew@zope.com]
Sent: Wednesday, April 03, 2002 10:14 AM
To: Kevin Carlson; zope-cmf group
Subject: Re: [Zope-CMF] New Portal types question

Use contentValues(Filter={'Type': ('XYZ',)})
----- Original Message -----
From: "Kevin Carlson" <khcarlso@bellsouth.net>
To: "zope-cmf group" <zope-cmf@zope.org>
Sent: Tuesday, April 02, 2002 3:40 PM
Subject: [Zope-CMF] New Portal types question

> I am creating a new portal type using the following method:
>  - From the portal_types 'contents' view, I add a new instance of a
> "Factory-based type information" object.
>  - I give the object an ID and use CMFCore:PortalFolder as the default
> information.
> After the object is created I click on the instance and edit the
> so that the Title and Metatype fields are "XYZ".
> It seems that the type is created ok.  The problem occurs when trying to
> iterate over ONLY the new object type...
> 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
> its argument a meta-type, however, "XYZ" never returns anything.  If I
> change the dtml-in statement back to "Portal Folder", the objects, and
> 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">
> What can be changed in the type information to get the first statement to
> work?  If that isn't possible, how can I filter the first statement on the
> metatype field?
> Thanks,
> Kevin
> _______________________________________________
> 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