Skip to content

plone/content/creating.html outdated for dexterity content (folder restrictions) #707

@zopyx

Description

@zopyx

https://5.docs.plone.org/develop/plone/content/creating.html#restricting-available-types-per-folder-instance

covers folder restrictions only for AT content but no support for Dexterity content.

The API for DX content is similar and available through an adapter:

        from Products.CMFPlone.interfaces import ISelectableConstrainTypes
        aspect = ISelectableConstrainTypes(self.context)
        aspect.setConstrainTypesMode(data['constrain_types_mode'])
        aspect.setLocallyAllowedTypes(allowed_types)
        aspect.setImmediatelyAddableTypes(immediately_addable)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions