O'Reilly logo

Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System by Martin Aspeli

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

Creating a New Portlet

With the content types in place, we now have a flexible system for managing cinema content. The site administrator can create the basic site structure with standard folders and pages as well as the more specific Cinema Folder and Film Folder types. Inside these, staff can describe Cinemas and Films in some detail, and add promotions for cinemas and groups of cinemas. However, we have not yet explained how promotions are shown to the user, which we will do using a new type of portlet.

The portlet is found in the portlets sub-package. The files here follow the conventions established in plone.app.portlets. For the promotions portlet, there is a page template called promotions.pt and a Python module called promotions.py.

Starting ...

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