Configuring the Metadata Tool
Overview
The "editable" elements of the Dublin Core (at present, Title
,
Description
, Subject
, Format
, Language
, Rights
) each have a
"default" policy, plus zero or more content-type-specific policies.
Each policy specifies:
- Whether the element is "required"
- Whether to supply a default value when a new content object is created, and if so, that value (currently, only allows "literal" values for the defaults).
- Whether to enforce a "vocabulary" for the element (i.e., must its values be drawn from a controlled set of values).
- The "vocabulary" (which may be "suggested values" if the "enforce" flag is not set).
Example
So, for instance, you could require that Title
, Description
, and
Subject
be supplied (your skins and/or workflow would need to use
the tool to validate this), and supply default values for Language
(en-US
, or es-ES
, or whatever) and Rights
(e.g.
Copyright (c) 2001, MyCompany, Ltd.; all rights reserved
).
Suppose as well that you want to suggest a list of keywords (the
Dublin Core Subject
element) for all content, but require that
News Items use only an approved set (to make building topic hierarchies
simpler).
To set these policies:
- In the Zope management interface of your CMFSite, select the
portal_metadata
tool. - Select it's "Elements" tab. Note that
Description
is the currently selected element. Check the "Required?" checkbox and click "Update". - Select the
Title
element and make it required as well. - Select the
Language
element and check the "Supply default?" checkbox. Fill in the desired default value (e.g., "en-US"), and click "Update". - Likewise, set up a default
Rights
entry. - Select the
Subject
element. Check its "Required" field, and then, in the "Vocabulary" field of its<default>
policy, enter the list of "suggested" values for all content across the site. Use one line per keyword (keywords can have embedded spaces). Click "Update" to save your changes. These values will now show up on themetadata_edit_form
in a multi-select box, allowing easy entry. - In the "new policy" section below the default policy, select "News Item" in the "Content type" drop down. Check the "Required" and "Enforce Vocabulary" fields, and supply the list of keywords you want NewsItems to draw from in the "Vocabulary" field (again, one line per keyword).
TODOs
- Illustrate validating against the configured policies.