[Product-Developers] content_type category portlets
Enrique Perez
eperez at yaco.es
Wed Apr 14 15:22:12 UTC 2010
Hi,
I'm trying to assign a portlet to a manager with an assignment of
category content_type. This is with a vanilla plone-4.0b1-1. The only
addition to a vanilla plone is, in the portlets.xml of the GS profile of
CMFPlone,
<assignment name="news" category="content_type" key="Folder"
manager="plone.rightcolumn" type="portlets.News" visible="True">
<property name="count">5</property>
</assignment>
and then run the import step. However, after this (and adding a folder
and a news item), I cannot see the portlet in any Folder object.
Inspecting the portlet manager, I see that:
ipdb> manager = getUtility(IPortletManager, name=u"plone.rightcolumn")
ipdb> manager['content_type']['Folder']
<plone.app.portlets.storage.PortletAssignmentMapping object at
0x2aaaac9c57d0>
I've got a PortletAssignmentMapping... If I delete it and add a
PortletCategoryMapping instead, like:
ipdb> del manager['content_type']['Folder']
ipdb> manager['content_type']['Folder'] = PortletCategoryMapping()
ipdb> from plone.app.portlets.portlets.news import Assignment
ipdb> manager['content_type'][u'Folder']['news'] = Assignment()
The portlet shows properly in Folders. I'm I missing something, or is
this a bug?
--
Enrique Pérez Arnaud <eperez at yaco.es>
Yaco Sistemas SL| http://www.yaco.es
C/ Rioja 5, 41001 Sevilla (España)
Tel: (+34) 954 50 00 57
Fax 954 50 09 29
More information about the Product-Developers
mailing list