[Zope-dev] Unique meta_types in a folder

Toby Dickenson tdickenson@geminidataloggers.com
Mon, 20 Mar 2000 07:24:02 +0000


On Fri, 17 Mar 2000 17:50:03 GMT, "Jason Spisak" <444@hiretechs.com>
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?

Yes.

This will list all the meta_types that the current user has
permissions to manage:

<dtml-in "filtered_meta_types(AUTHENTICATED_USER)" mapping>
<dtml-var name>
</dtml-in>

And this will list them all:

<dtml-in all_meta_types mapping>
<dtml-var name>
</dtml-in>

Both of those will do the right thing in either a folder or a ZClass
ObjectManager.

Toby Dickenson
tdickenson@geminidataloggers.com