Personal tools

Feb 25, 2013

How to transform a dexterity Item in to a dexterity Container

Sometimes instructions are missing ;)

How to transform a dexterity Item in to a dexterity Container

The use case of adding container capabilities to content types is common in the Plone world. I show a nifty solution that applies to dexterity content types


This is a rather technical post, full of code. Faint of hearth you are advised!

The story

Not all the content types are designed from the beginning with a container behaviour, a feature that can become a requirement in consequence of specification changes.

It happened also to me and in my case I had to deal with dexterity based content types. I started googling around and found this unresolved question on the dexterity mailing list.

Starting from the suggestions in the thread, I managed to find out a nifty solution that reveals some interesting aspects of the software we work with.

read more