Best way to have special objects in my products produc list?
I'm making a product that is going to have sub products that doesn't make sense anywhere else. These subproducts should therefore not appear in normal folders. There seems to be several ways to achievie this, what do YOU think are the best way, and why? I'm still using Zope 2.3.4, and I'm subclassing a ZCatalog, and therefore using the standard ObjectManager. Any input appreciated.
Lennart Regebro writes:
I'm making a product that is going to have sub products that doesn't make sense anywhere else. These subproducts should therefore not appear in normal folders.
There seems to be several ways to achievie this, what do YOU think are the best way, and why? I use an appropriate "all_meta_types" method in my "container" products.
Why? I did not yet meet a simpler way... Dieter
From: "Dieter Maurer" <dieter@handshake.de>
I use an appropriate "all_meta_types" method in my "container" products.
Why? I did not yet meet a simpler way...
As I understand it all you can do there is to filter out meta_types. I need also to include a meta_type. If I just add in a meta_type that product isn't registered, and so has no icons and so on, so I need some type of registration too, right?
Lennart Regebro writes:
From: "Dieter Maurer" <dieter@handshake.de>
I use an appropriate "all_meta_types" method in my "container" products.
Why? I did not yet meet a simpler way...
As I understand it all you can do there is to filter out meta_types. I need also to include a meta_type. You do not understand right:
You can add information to create Zope objects that are nowhere (else) registered. Like that: def all_meta_types(self): return ( { 'name' : TopicConfig.meta_type, 'action': 'TopicConfig_add', 'permission': ManagePortal, }, )
If I just add in a meta_type that product isn't registered, and so has no icons and so on, so I need some type of registration too, right? If you want that your object has an icon, give it (more precisely: its class) one:
icon= ImageFile(....) "ImageFile" comes from "App.ImageFile". It is only that registration does this for you as a side effect. Registration is not necessary for a class to get an icon. Dieter
participants (2)
-
Dieter Maurer -
Lennart Regebro