[Zope-CMF] Re: How to save extra data with CMF-object (update)
Ausum
augusto@artlover.com
Mon, 23 Jul 2001 10:23:07 -0500
As Tres suggested earlier in this thread, it is possible to add new
metadata to portal objects, as far as those were added via the Property
Manager.
So this is what I've done so far, after adding the desired metadata
index at the catalog:
- Added the desired label input at the metadata_edit_form
skin.
- Enabled the metadata_edit script to create the extra data,
by writing the following code at the top of the script,
after adding the right parameter to the parameter list:
if not hasattr(context, 'newproperty'):
context.manage_addProperty('newproperty', '', 'string')
context.manage_changeProperties(newproperty=newproperty)
else:
context.manage_changeProperties(newproperty=newproperty)
And that's all. The so added metadata gets catalogued as expected.
Ausum