I’m developing a content type for Plone 4, and I’d like to block all user, group, and context portlets it may inherit from its parent object. I’m thoroughly confused by the documentation at this point–in portlets.xml, <blacklist/> only seems to address path-specific blocking. <assignment/> seems like what I want, but it seems too specific–I don’t want to manage the assignment for all possible portlets on my content type.
There are hints that I’ve found that customizing an ILeftColumn and IRightColumn portlet manager specific to the content type, but I can’t find any good examples. Does anyone have any hints or suggestions? I feel like I’m missing something dead simple.
to prevent the portlet aquisition and maintain the possibility of adding portlert you can add an event listener on the creation of your contents that auto blocks the aquisition.
Like this:
and than do this:
Note: this code is inspired by the plone.app.portlet manage view
Edit 19/08/2011: included fixes as suggested by @will in my untested code…so now is tested