[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cmf
Subject:    Re: [Zope-CMF] Updating Metadata...
From:       Tres Seaver <tseaver () zope ! com>
Date:       2001-09-28 11:16:11
[Download RAW message or body]

Josef Albert Meile wrote:

> I have two questions about metadata:
> 1) How can I change the metadata without showing the
> metadata_edit_form? I am asking the user for the metadata in my
> editForm.


In the method your form posts to, add a call to 'context.editMetadata()',
passing the values you want to set as keyword arguments.  See the
'metadata_edit' PythonScript in the 'content' skin.


> 2) I have a new product which has a new field called country. How can
> I add this field to the portal's metadata?


You can define metadata policies for new elements on the 'portal_metadata'
tool.  In your case, I imagine you want to set up a controlled vocabulary
for it;  it should work just as the 'Subject' field does, perhaps with only
a single value allowed.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic