Current

This document is valid for the current version of Plone.

Vocabulary Directive now replaced by Utilities

by Plone Documentation Team last modified Sep 19, 2010 11:16 AM
Vocabulary factories should be registered using utilities

Previously a named vocabulary would be registered in this manner:

Zope 2 style
<vocabulary
     name="collective.exampleapp.Subscribers"
     factory=".vocabularies.Subscribers" />

Zope 3 style
<utility
     name="collective.exampleapp.Subscribers"
     component=".vocabularies.Subscribers"
     provides="zope.app.schema.vocabulary.IVocabularyFactory"
      />
See another example of using a utility in the community documentation.
Or register your vocabularies using a grok utility
Read more about how vocabularies are handled the grok way in the dexterity developer manual
Code that attempts to use the Zope 2 style vocabulary directive will throw a configuration error
ConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/zope', u'vocabulary')