Customizing Plone portlet

3 Messages Forum Options Options
Embed this topic
Permalink
George L
Customizing Plone portlet
Reply Threaded MoreMore options
Print post
Permalink
Hi,

With the new plone.portlets infrastructure, how do I go about customizing an existing plone.portlets portlet such as the calendar portlet? ... and in a site-specific or theme-specific way.

Looking at plone.app.portlets, metaconfigure.py and metadirectives.py, it seems like I can do this by having  the following ZCML:

    <plone:renderer
      portlet="plone.app.portlets.portlets.calendar.ICalendarPortlet"
      class=".calendar.CustomRenderer"
      layer=".interfaces.IThemeSpecific"
    />

Is this correct?

A related question -- when defining metadirectives, how does Zope know to assign the value for "class" and "for" to the variables "class_" and "for_"?

Peace,
George
George L
Re: Customizing Plone portlet
Reply Threaded MoreMore options
Print post
Permalink
George Lee wrote:
    <plone:renderer
      portlet="plone.app.portlets.portlets.calendar.ICalendarPortlet"
      class=".calendar.CustomRenderer"
      layer=".interfaces.IThemeSpecific"
    />
Or rather, "plone:portletRenderer"
Martin Aspeli-2
Re: Customizing Plone portlet
Reply Threaded MoreMore options
Print post
Permalink
George Lee wrote:

>
> George Lee wrote:
>>     <plone:renderer
>>       portlet="plone.app.portlets.portlets.calendar.ICalendarPortlet"
>>       class=".calendar.CustomRenderer"
>>       layer=".interfaces.IThemeSpecific"
>>     />
>>
>
> Or rather, "plone:portletRenderer"

Yep, that's how you do it.

Make sure you've got plone.app.portlets parsed first, though, so do e.g.:

<include package="plone.app.portlets" />

<plone:portletRenderer ... />

Martin

--
Acquisition is a jealous mistress


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers