[Zope] newbie: ZClass as a multifolder prototype

Milos Prudek milos.prudek@worldonline.cz
Tue, 05 Jun 2001 23:03:38 +0200


> > Can i create a ZClass with folders?
> >
> > As far as I can see, I cannot put folders into ZClass definition.
> >
> > I know I can have ObjectManager as a superclass, and then I can add
> > folders to any ZClass instance. But is it possible to have folders in
> > ZClass definition?
> 
> Yes. The folders do not appear in the instance as content though.
> Also, you may be missing the fact that you may need to set
> permissions in your ZClass (Define Permissions tab).

Well, I managed to create folders within an _instance_ of a class. I
added the following method:

 <dtml-call "manage_addProduct['OFSP'].manage_addFolder('comments',
'Title of comments folder')">

... to methods of the class, and then called that method on an instance
of the class.

Can I create folder within a _definition_ of a class, so that there is
no need to call the method? How? The only way seems to be to modify the
"add" method of the class... is that right?

--
Milos Prudek