You are not logged in Log in Join
You are here: Home » Download Zope Products » Content Management Framework » CMF Documentation » Developing for CMF » Configuring the Metadata Tool » View Document

Log in
Name

Password

 

Configuring the Metadata Tool

the 'portal_metadata' tool provides a "configuration point" for setting site-wide policies about the metadata associated with content in general; it also allows specialization of these policies based on the content type.

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:

  1. In the Zope management interface of your CMFSite, select the portal_metadata tool.
  2. Select it's "Elements" tab. Note that Description is the currently selected element. Check the "Required?" checkbox and click "Update".
  3. Select the Title element and make it required as well.
  4. Select the Language element and check the "Supply default?" checkbox. Fill in the desired default value (e.g., "en-US"), and click "Update".
  5. Likewise, set up a default Rights entry.
  6. 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 the metadata_edit_form in a multi-select box, allowing easy entry.
  7. 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.