Search code examples
plonedexterity

Can a plone.behavior be enabled for just some objects of a type?


I would like to set a marker interface to some objects that should have additional fields. If I remove this marker interface again the fields should be removed too.

Now I'm trying to understand plone.behavior. But I'm not sure if a behavior must be enabled for all objects of a type or is it possible to enable it for only a subset of objects of that type?


Solution

  • Take a look at collective.instancebehavior, an add-on aimed to do exactly what you want: to enable behaviors per content type instance.