[ZPT] Accessing class attribute from ZPT

John Morton jwm@plain.co.nz
Thu, 17 Jan 2002 16:47:09 +1300

I have a product that contains a class called ITProfile which has a class 
attribute called default_profession_types which is used to fill a select box 
when editing instances of the class. I want to be able to access those 
defaults from a page unrelated to the product directly; a customized search 
page as it happens. 

What I want to know is whether I can access class attributes from arbitary 
classes inside arbitary products at all in Zope, and how to do it with ZPTs 
in particular.

On reflection, this seems to be a common pattern - objects that have 
attributes whose possible values should be derived from some class attribute. 
That attribute needs to be used by search pages and needs to have an 
interface for updating it for the entire class. Does anyone have a good Zope 
solution for this problem?