Martin Aspeli wrote:

Would it make sene for the core plone.app.portlets code to provide an INTERFACE_CATEGORY ootb? That way, there could be a simple api for registering portlets per interface. Something like:

from plone.app.portlets import registerPortletForInterface
registerPortletForInterface(a_portlet_assignment, IMyInterface)

Based on those registrations, code in plone.app.portlets would then return a list of portlet assignments for each interface implemented by the context object.

I like the idea - it'd be worth a PLIP, though it's too late for 3.1 of course. Obviously, we couldn't have a sensible, generalised TTW UI for this (which is why we did it by portal_type, not interface in the first place), but for programmers this'd be nice. With the Plone 3.1 GS improvements, this would actually "just work" for you to assign a new portlet to an interface... I think. ;-)

It doesn't have to be in plone.app.portlets, though. You could write a small package that provided the override IPortletContext and wired up the new category, and just make Quills depend on that category.

Hi Martin (and anyone else listening),

First of all, thanks for your help with my portlet issues. I think I've got things working about right in Quills now :).

I have just checked-in a very bare bones, untested, and non-working implementation of this. It's at <http://dev.plone.org/collective/browser/collective.portletsbyiface>.

I'm not sure when I'll next have a chance to play with this, so I thought I'd let you and others know now in case anyone else is interested in getting this working.

Cheers,


Tim

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to