Here’s a little gotcha I just ran into again recently. I’ve got a new folderish Plone content type that I’m working on, to which I’d like to be able to add plain-old Pages. At first, my profiles/default/types/NewFolderish.xml looked like this:
... <property name="filter_content_types">True</property> <property name="allowed_content_types"> <element value="Link" /> <element value="Page" /> <!-- WRONG --> </property> ...
Well, that didn’t allow me to add a page to a New Folderish content type. Here’s why: for GenericSetup, you have to identify a content type by it’s meta_type. For most default content types, it’s what you’d expect. For Page and Collection, it’s not. Here’s the correct profiles/default/types/NewFolderish.xml
... <property name="filter_content_types">True</property> <property name="allowed_content_types"> <element value="Link" /> <element value="Document" /> <!-- CORRECT --> </property> ...
To allow a Page
<element value="Document" />
To allow a Collection
<element value="Topic" />
Happy Ploning!