[Zope-CMF] context.edit in content portal_skins

Carl Rendell cer@sol43.com
Tue, 16 Jul 2002 08:51:40 -0700


Jim,

Not sure how to say this... It does not work quite like that.

The context.edit() you are referring to is the method within the 
PortalFolder product which changes attributes of an existing folder.

You'll find all of the products within the CMF directories you 
imported to install CMF [CMFCore, CMFDefault, etc] in this case 
you're looking for PortalFolder in the CMFCore directory.

The attributes which are allowed to be passed to the _edit_ method 
are defined by the product, and cannot be changed merely by adding 
another key/value pair into the call.

You have a number of choices if you wish to _extend_ the base 
PortalFolder product.

  - ZClass with PortalFolder as the base class

  - New product using PortalFolder as the base class, and additional
    _properties_ [the method I prefer]

  - New product with its own classes defined

There are others of course, but this is the basic path you'll need 
to follow. The information for creating ZClasses and Products is 
all within the community of Zope sites.

~C

On Tuesday, July 16, 2002, at 03:24  AM, zope-cmf-request@zope.org 
wrote:

> Message: 2
> From: Jim Pharis <jpharis@rtl.org>
> Cc: Zope-CMF@zope.org
> Date: 15 Jul 2002 12:40:50 -0400
> Subject: [Zope-CMF] context.edit in content portal_skins
>
> CMF'ers
>
> In CMF->portal_skins->content there is a Python script called
> folder_edit which takes 2 parameters. Whats context.edit, where is 
> it? I
> can't find it anywhere.
>
> I am adding an extra input field to contain some additional info. I am
> assuming that I need to send the 3rd parameter to context.edit the same
> way I send the first 2 parameters. This is my change.
>
> Parameter List: title, description, creator, choice=' Change '
>
> context.edit( title=title,
>               description=description,
>               creator=creator)
>
> Of course gives me an error when I add creator.
>
> Hopefully this is an easy question and somebody can just point to where
> context.edit is. Maybe its not though.
>
> Thanks in advance, Jim

Carl E. Rendell
Solution43
Information Distribution Consulting        |   "Ahhhh the power of
cer@sol43.com                              |    acquisition"  - Chef Z