Hermann Himmelbauer wrote:
> 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">
> permission = "zope.View"
> 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:
<implements interface=".interfaces.IGalleryItemContained" />
<require like_class="zope.app.file.interfaces.IImage />
<require like_class="zope.app.folder.Folder" />
> 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