Hi all, I know I can define my own views of an object with something like this: manage_options = ( {'label': 'Propriétés', 'action': 'manage_editForm',}, {'label': 'Vue', 'action': 'index_html',}, ) But doing this means that all the standard views are gone. I would like to keep some of the standard views, and at the same time add a few of my own. How would I go about doing this? TIA, Jesper -- Jesper Holmberg |"But how can | jesper.holmberg@enst-bretagne.fr | one be warm | ENST Br, BP 832, 29285 Brest, FRANCE | alone?" |
On Tue, Nov 13, 2001 at 04:02:10PM +0100, Jesper Holmberg wrote:
manage_options = ( {'label': 'PropriИtИs', 'action': 'manage_editForm',}, {'label': 'Vue', 'action': 'index_html',}, )
But doing this means that all the standard views are gone. I would like to keep some of the standard views, and at the same time add a few of my own. How would I go about doing this?
manage_options = ParentClass.manage_options + ( {'label': 'PropriИtИs', 'action': 'manage_editForm',}, {'label': 'Vue', 'action': 'index_html',}, ) Oleg. -- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Tuesday 13 November 2001 10:02 am, Jesper Holmberg allegedly wrote:
Hi all,
I know I can define my own views of an object with something like this:
manage_options = ( {'label': 'Propriétés', 'action': 'manage_editForm',}, {'label': 'Vue', 'action': 'index_html',}, )
But doing this means that all the standard views are gone. I would like to keep some of the standard views, and at the same time add a few of my own. How would I go about doing this?
TIA,
Jesper
You need to add on the views of the base classes. As in: manage_options = ( {'label': 'Propriétés', 'action': 'manage_editForm',}, {'label': 'Vue', 'action': 'index_html',}, ) + SimpleItem.Item.manage_options + ... Check out a built in Zope class, like lib/python/OFS/ObjectManager.py for an example... hth, /---------------------------------------------------\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association c.duncan@nlada.org \---------------------------------------------------/
participants (3)
-
Casey Duncan -
Jesper Holmberg -
Oleg Broytmann