[Zope] Folder-specific ZClasses

Kevin Dangoor kid@kendermedia.com
Mon, 2 Aug 1999 17:24:39 -0400


Hi,

-----Original Message-----
From: Petru Paler <ppetru@bv.ro>
To: zope@zope.org <zope@zope.org>
Date: Monday, August 02, 1999 3:58 PM
Subject: [Zope] Folder-specific ZClasses


>  How can you define a ZClass (for example the CD from the ZClasses
>tutorial) that can only be added on a specific folder (and its subfolders)
?

You accomplish this by creating a specific container for the object (instead
of using a generic Folder). To do this, create a ZClass (say 'CDRack') that
inherits from Object Manager (this will be your container). Then, create
your other ZClass (eg 'CD') in the Methods tab of CDRack.

Then, when you add a CDRack, you'll be able to add CD objects (and nothing
else). And, you won't be able to add CD objects anywhere else.

I believe there is some discussion of this within the ZClass Tutorial.

Kevin