O'Reilly logo

Plone 3 Products Development Cookbook by Marcos F. Romero, Juan Pablo Giménez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing a new portlet according to our requirements

In the previous recipe, we covered how to create a new portlet package and then we examined some of its most remarkable pieces of code.

In this task, we will modify some of the previously explained classes and modules to achieve the desired results: to display several Banners inside a single portlet.

How to do it...

  1. Add a schema to the portlet interface: In the bannerportlet module, change the IBannerPortlet interface definition for the following block of code:
    ... from pox.banner.interfaces import ISection from plone.app.vocabularies.catalog import \ SearchableTextSourceBinder ... class IBannerPortlet(IPortletDataProvider): section = schema.Choice( title=_(u"Section"), description=_(u"Base ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required