[Zope] ZClasses inside ZClasses

flight@mathi.uni-heidelberg.de flight@mathi.uni-heidelberg.de
Wed, 27 Oct 1999 14:56:56 +0200


I'd like to setup a site with a simplified management screen, similar
to Zope.org in that the editor of the site only has a very limited set
of elements to choose from: A two-level hierarchy structured in sections
and subsections, and both of them can contain one or more pages.

I thought I should use ZClasses to implement this: A product "MySite",
inside a ZClass "MySiteClass" (with a base class ZObjectManager). Now
I thought I should create a second ZClass "Section" (also derived from
ZObjectManager) inside the methods view of MySiteClass, then a ZClass
"Subsection" inside "Section" and finally a ZClass "Page".

I think that's what the Zope Developer Guide suggests, in "Classes inside
Classes"

But now I fail to tell MySiteClass that it should only take subobjects of
type "Section": The "Subobjects" view of the MySiteClass class doesn't
list Section (I guess since it's not a product but only a method?).

I'm a bit lost here: Do I have to drop this concept with encapsulated
ZClasses and should I instead setup the Section, Subsection and Page
classes as products of their own ?

	Gregor