[Zope] Reading ZClass properties from outside the ZClass

Phill Hugo phill@fortune-cookie.com
Fri, 19 Jan 2001 11:58:59 +0000


I have a ZClass, "MyZClass" which contains 2 propertysheets,
"PublicInfo" and "PrivateInfo".

PublicInfo contains Selections produced from Lists in PrivateInfo. Works
wonderfully, however in the site I wish to get at the PrivateInfo items
without touching an Instance of MyZClass (Its easy that way but I cannot
be sure that instance will always be there).

Basically I need to do something like...

<dtml-in
"Control_Panel.Products.XYZProduct.MyZClass.propertysheets.PrivateInfo.getProperty('MyList')">

This works when logged in as an Administrator as the Control_Panel is
visible then, however for normal users it fails.

Is there a way to get at these details without asking an instance? I'm
assuming that the answer is no due to the security aspect but it would
be preferable in this case to have the List in the ZClass rather than in
the site content (perhaps in the root folder properties).

I've suppose I could use a Proxy role but I wonder if there is something
as simple as..

<dtml-in "MyZClass.MyList"> without doing <dtml-in
"MyInstanceOfMyZClass.MyList">

Phill