[Zope] Adding, removing views
Casey Duncan
c.duncan@nlada.org
Wed, 14 Nov 2001 15:17:37 -0500
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
\---------------------------------------------------/