[Zope-dev] Unique meta_types in a folder

Pavlos Christoforou pavlos@gaaros.com
Fri, 17 Mar 2000 13:03:35 -0500 (EST)


On Fri, 17 Mar 2000, Jason Spisak wrote:

> Pavlos,
> 
> I wasn't quite clear.  I'm trying to get 'possible_values'.  Right now the
> only way is to iterate through all the items in a folder and only append
> the unique ones.  That would take a very long time.  Is there a way to
> access the allowables defined by the  "Sub Objects" tab of a Zclass?
> 

Oops I am sorry .... I do not know whether there is a magic Zope method to
return that. If not then you are right and you will  have to
iterate over all subobjects, like (tested):

<dtml-call "REQUEST.set('tmp',{})">
<dtml-in objectValues>
<dtml-call "REQUEST['tmp'].update({meta_type:''})">
</dtml-in>
<dtml-return "REQUEST['tmp'].keys()">

Pavlos