[Zope-CMF] Additional property to portal_type

Jeffrey Franks jfranks@quik.com
Sun, 04 Aug 2002 08:23:20 -0500


Tres Seaver wrote:
> 
> On Thu, 2002-08-01 at 19:44, Pawel Lewicki wrote:
> 
> > Is there any simpler way to add an extra property to default CMFDocument
> > (e.g.) than overriding the whole class?
> 
> ScriptableTypeInfo is your friend:
> 
> http://cmf.zope.org/Members/tseaver/how_tos/using_scriptable_type_info
> 
> You can add properties after creating the object using
> 'manage_addProperty', e.g.::
> 
>   product.manage_addProperty( 'some_prop', 'initial value', 'string' )
> 

I'm applying this to a portal_type of 'File' with meta_type 'Portal File'

I've added one attribute but can't view or edit it. I'm thinking that I
need to create a new meta type and add view/edit scripts.

Is that what's needed?
How can I get view and edit of these added attributes?

-- jlf