Hi all, Is there a way to display in the add list only the products you want added to a product that subclasses Folder. I have subclassed folder and added methods that add other products that are components of the overal product. This is to make distribution of the prodcut easier and editing contents more visual. I would like the add list restriced when inside the sublassed folder, and would like the sub products removed from the list when outside. If this is wishful thinking, that's fine, it would just make use of the product more intuitive. Thanks Sean Kemplay __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
Sean K wrote:
Hi all,
Is there a way to display in the add list only the products you want added to a product that subclasses Folder.
I have subclassed folder and added methods that add other products that are components of the overal product. This is to make distribution of the prodcut easier and editing contents more visual.
Hi, you have to define a all_meta_types-method in your Class, which should return the allowed meta_types. Something like this should do it: def all_meta_types(self): ''' ''' mt = [] allowed_meta_types=('DTML Document','Folder','File') for meta_type in Folder.all_meta_types(self): if meta_type['name'] in allowed_meta_types: mt.append(meta_type) return mt Cheers, Maik
participants (2)
-
Maik Jablonski -
Sean K