Adding a my own portlet manager
Martin Aspeli
optilude at gmx.net
Fri Sep 21 16:47:45 UTC 2007
julien.63 wrote:
> Hi,
> Based on this tutorial
> http://plone.org/documentation/how-to/adding-portlet-managers/view?searchterm=portlet
> http://plone.org/documentation/how-to/adding-portlet-managers/view?searchterm=portlet
> ,I'm trying to add my own portlet in my own portlet manager in my own view.
> I have a problem with the portlet manager.
> The server restart normally but I have the following error message when
> refreshing the page :
>
> ContentProviderLookupError: LastPublicationPortletManager
That suggests the portlet manager local utility has not been registered.
> It's comes from this file, which is my viewlet (in
> {myProduct}/browser/template/sancy.pt)
> <div style="background-color:#7E7C7C; color:white; height:100px;
> margin-top:10px; width:100%;">
> <tal:block replace="structure provider:LastPublicationPortletManager" />
> </div>
>
> It's sounds like it could not find the porlet manager. If I comment the tal
> tag, then it works fine (I mean, the viewlet is displayed without any
> errors...)
> I've defined the portlet manager like this:
> in {myProduct}/browser/interfaces.py
> from plone.portlets.interfaces import IPortletManager
> class ILastPublicationContent(IPortletManager):
> """we need our own portlet manager for last publication.
> """
>
> in {myProduct}/profiles/default/portlets.xml
> <?xml version="1.0"?>
> <portlets>
> <portletmanager
> name="LastPublicationPortletManager"
This shouldn't matter at all, but as a matter of convention the name of
the manager should correspond to the name of your product, e.g.
lecastyle.LastPublication. This minimises the risk of conflict with
other products.
> type="Products.LECAStyle.browser.interfaces.ILastPublicationContent"
> />
I assume there's a </portlets> here as well... otherwise, this looks
right to me.
> Am I missing something to get the portlet manager ?
Did you install the GS profile/product? Were there any errors? Try to
install just that step from your profile in portal_setup and watch for
errors.
Martin
--
Acquisition is a jealous mistress
More information about the Product-Developers
mailing list