[Plone-IT] Aggiungere un portlet manager: errore

pepe pepe.bz a gmx.net
Gio 2 Ott 2008 08:34:51 UTC


mi sembra di avere avuto lo stesso problema... prova a creare un nuovo
plone site in quella istanza zope e non dovrebbe piu rispuntare questo
errore.

se guardi nei commenti al howto su plone.org c'é anche descritto questo
problema...
fammi sapere...

ciao
andreas

Simone Sacchi wrote:
> Ciao a tutti,
>
> sono nuovo della lista, intanto mi presento: lavoro all'Università di Bologna 
> e utilizzo Plone su http://www.biblioteche.unibo.it
>
> Sto migrando dalla 2.5 alla 3.1 e ho un problema nell'implementazione di un 
> nuovo portlet-manager in un theme product che sto facendo,
>
> Ho seguito l'how-to su plone.org:
> http://plone.org/documentation/how-to/adding-portlet-managers
>
> I passi per aggiungere la viewlet sono andati lisci.
>
> Poi ho creato l'interfaccia in  Products/NEWTHEME/interfaces.py
> e registrato il portlet manager in browser/portlets.xml
>
> Il problema è che quando vado a modificare il template della viewlet per 
> richiamare il portlet manager inserendo:
> <tal:block replace="structure provider:my.searchengineportlets" />
>
> ottengo il traceback che vi allego.
>
> Vi scrivo direttamente anche 

> il codice che ho usato (la parte è in inglese, 
> copiata da una mail che ho mandato alla lista internazionale ma che non è mai 
> arrivata....):
>
> In browser/interfaces.py i added:
> ------------
> from plone.portlets.interfaces import IPortletManager
>
> class IMyAboveContent(IPortletManager):
>  """A description goes here    """
> --------------
>
> Here is the content of profiles/default/portlets.xml
> -------------
> <?xml version="1.0"?>
> <portlets>
>  <portletmanager
>    name="my.searchengineportlets"
>    type="Products.portaleBiblioteche.theme.browser.interfaces.IMyAboveContent"
>  />
> </portlets>
> --------------
>
> In browser/configure.zcml i created the viewlet that should contain the 
> portlet manager:
> -----------------------
> <!-- Viewlet for the search engine portlet-->
> <browser:viewlet
>     name="portaleBiblioteche.search_engine"
>     manager="plone.app.layout.viewlets.interfaces.IContentViews"
>     layer=".interfaces.IThemeSpecific"
>     class=".viewlets.SearchEngineViewlet"
>     permission="zope2.View"
> />
> -----------------------
>
> Here is the class for the viewlet in browser/viewlets.py
> --------------------
> class SearchEngineViewlet(ViewletBase):
>             render = ViewPageTemplateFile('templates/search_engine.pt')
> -------------------
>
> And finally the template for the viewlet browser/templates/search_engine.pt 
> which contains:
> -------------------
> <tal:block replace="structure provider:my.searchengineportlets" />
> -------------------
>
> Everything is Ok until I add
> <tal:block replace="structure provider:my.searchengineportlets" />
> to the template...
>
>
> Intanto grazie mille per qualsiasi risposta!!!!
> Simone
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Plone-IT mailing list
> Plone-IT a lists.plone.org
> http://lists.plone.org/mailman/listinfo/plone-it
> http://www.nabble.com/Plone---Italy-f21728.html




Maggiori informazioni sulla lista Plone-IT