[Zope] about restricting addable types in Plone

Martijn Pieters mj at zopatista.com
Thu May 4 12:14:25 EDT 2006


On 5/4/06, Sergio Gomez <sofrosine at gmail.com> wrote:
> I am working with Plone 2.1.2, Zope 2.8.6 and python 2.3.5. I would
> like to know if there is a way to restrict addable types to a
> folderish object programmatically.
> What I need is to allow adding a certain type of items and not otheres
> depending on the value of one field in my folderish object.
> For example, if the value of the field is "0", I can only add "News
> Item", if the value is "1", I can only add "File", and so on.

Just subclass a ATContentTypes.content.folder type and provide your
own versions of the methods in
ATContentTypes.lib.contstraintypes.ConstrainTypesMixin.

--
Martijn Pieters


More information about the Zope mailing list