Personal tools
You are here: Home Documentation How To's How to add Related Items behaviour to Dexterity content types

How to add Related Items behaviour to Dexterity content types

by Nguyen, T. Kim last modified Mar 28, 2013 02:15 PM

I found this page:

 
 
which said that you could add plone.app.dexterity.behaviors.metadata.IRelatedItems to the FTI's behaviors field, but then I saw a stackoverflow answer that said it had been dropped in Dexterity 1.0.1:
 
 
so then I added this product to my buildout and activated it: https://pypi.python.org/pypi/plone.app.relationfield and then the Dexterity content type's behaviors included a new "Related Items" checkbox that I could check.  
 
Equivalently, instead of checking that box, add the string "plone.app.relationfield.behavior.IRelatedItems" to the factory-type information (FTI) for the Dexterity content type.  You'll find the FTI in the ZMI's portal_types folder.  For example, my Person content type's behaviors property now has this value:
 
plone.app.dexterity.behaviors.metadata.IDublinCore
plone.app.content.interfaces.INameFromTitle
plone.app.dexterity.behaviors.discussion.IAllowDiscussion
plone.app.relationfield.behavior.IRelatedItems
 
 
Document Actions
  • Print this
  • Bookmarks