Hi (Martin),
Is it possible to assign a selection of portlets to a specific
interface, rather than a specific content type? That is, can I do
something like the following, where INTERFACE_CATEGORY has been
substituted in for CONTENT_TYPE_CATEGORY?
from plone.portlets.constants import INTERFACE_CATEGORY
left_column = getUtility(IPortletManager, name="plone.leftcolumn")
left_category = left_column[INTERFACE_CATEGORY]
left_portlets = left_category.get('Weblog', None)
# It may be that it hasn't been created yet, so just to be safe:
if left_portlets is None:
left_category[my_interfaces_dotted_name] =
PortletAssignmentMapping()
left_portlets = left_category[my_interfaces_dotted_name]
for name, assignment, kwargs in DEFAULT_LEFT_PORTLETS:
if not left_portlets.has_key(name):
left_portlets[name] = assignment(**kwargs)
Thanks,
Tim
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers