Hermann Himmelbauer wrote: > Hi, > I have the problem here that I have to configure several classes, which I > currently do via zope's zope:class directive, such as: > > <class class=".foo.f1"> > <require > permission = "zope.View" > interface=".interfaces.If1" > /> > <require > permission="zope.ManageContent" > set_schema=".interfaces.IEmail" > /> > </class> > > The only thing that changes throughout the configuration is the interface. > > I have around 20 classes which have to be configured the same, so I wonder if > there's some shortcut?
I've used 'like_class', some examples: <class class=".MyImage"> <implements interface=".interfaces.IGalleryItemContained" /> <require like_class="zope.app.file.interfaces.IImage /> </class> <class class=".MySite"> <require like_class="zope.app.folder.Folder" /> </class> > Moreover, does someone know if the configuration of an object is inherited to > a child object? AFAIK, 'class' zcml directives do not. If you need to 'expose' 20 distinct classes, I think you'll require a zcml class declaration for each. _______________________________________________ Zope3-users mailing list Zope3firstname.lastname@example.org http://mail.zope.org/mailman/listinfo/zope3-users