[Zope-CMF] Adding properties to a content type programmatically....

Kevin Carlson khcarlso@bellsouth.net
Mon, 9 Dec 2002 18:19:25 -0500


If the content type is your current context,

   context.manage_addProperty('name', value, 'type')

where type can be any one of the type available in the management interface.
For example,

   context.manage_addProperty('test', 1, 'boolean')

Hope that helps,

Kevin

-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of John Paul
Sent: Friday, December 06, 2002 5:59 AM
To: zope-cmf-request@zope.org; zope-cmf@zope.org
Subject: [Zope-CMF] Adding properties to a content type
programmatically....





Hi

 How can i add properties to a content type programmatically? We manage to
add a content type that renders an image.... but the problem is we have to
add it through ZMI.... so is there a way to add it programmatically..

 Thanks for any help.....



_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests