[Zope] [Zope product] How to register an icon for an abstract
superclass ?
Dieter Maurer
dieter at handshake.de
Fri Sep 5 21:44:15 EDT 2003
Sinclair wrote at 2003-9-2 16:30 +0200:
> I aim to have a ZMI icon shared by many classes who inherit from the same
> superclass.
>
> As I didn't want those class appear in the ZMI "add object" choice list, I
> didn't register them in the .init file.
You can register the class but with the "visible=0" paramter.
Alternatively, you can use the old "misc" feature:
"misc" is a dictionary mapping ids to objects (e.g. "ImageFile" objects).
When the product initialization code find a "misc" variable
in the module, it publishes its content under:
/misc_/<product_name>/id
You can then define "icon= '/misc_/<product_name>/id'"
in your class.
Dieter
More information about the Zope
mailing list