4 May
2006
4 May
'06
4:14 p.m.
On 5/4/06, Sergio Gomez <sofrosine@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