You are here: Home Plone products Products.SimplePortlet

Products.SimplePortlet (1.2)

1
by Olha Pelishok last modified 2010-05-07
0.0
0.0
0.0
0.0
Released on 2010-05-04 by Plone Foundation under GPL - GNU General Public License available for All platforms.
Software development stage: stable
Portlets as content-types

SimplePortlet is a product that lets the user create his own portlets in Plone. It adds three content types called Portlet, Smart Folder Portlet and RSS Portlet.. Adding these objects to a folder will display it as a portlet in either the left or right column. Next to a title, description and some rich content you can also control in which column it has to show up, if it should show up in subfolders and whether it should be displayed at all. The Smart Folder portlet shows additional result from a designated Smart Folder and the RSS Portlet allows you to pick a CMFSin channel (when installed).

SimplePortlet is based on archetypes so that must be installed on your system.

Usage

After installation, two new classic portlets have been add to the plone-root:

  • 'here/portlet_simpleportlet/macros/portlet_left'
  • 'here/portlet_simpleportlet/macros/portlet_right'

These two new entries in the slots are the actual macros that display the user-defined portlets. They act as placeholders and at runtime they will check in the current folder (and parent folders to accomodate inheritance) to see if there are Portlets to display. So, removing these place-holders from the slot definitions will also disable the displaying of custom Portlets! This is important.

Of course, by changing the order in these slot properties, you can control where in the order the custom portlets will be displayed.

Note: a portlet with the same id as a portlet higher up the hierarchy will overrule it. This enables you to turn off a Portlet that is defined higher in the tree. Simply create an empty portlet with the same id and set it not to display.

Together with SimplePortlet comes a layout editor that is presented as an extra tab on folders. The tab is called 'portlets' and gives you a form to change how portlets are displayed for that folder and subfolders. Portlets are inherited from higher folders. With the layout editor you can overrule this inheritance by creating a local definition. This definition is also active for subfolders because they inherit portlets on their part (unless you turn it off for them as well).

So, each colum has his own set of options and lets you create a new order or definition for which portlets should be displayed. Simply type the name of one of the available portlets in either of the text areas. One portlet per line! Don't forget to include the user-defined portlets.

SimplePortlet only allows the use of so called friendly portlet names. So instead of having to type 'here/portlet_about/macros/portlet' you can just type 'about'. An administrator can add or alter these friendly names and their associated true paths in the properties tab of portlet_manager in ZMI. The id is the friendly name and the value is the full path. Make sure you add new properties as strings.

During installation, SimplePortlet scans all folderish objects in search for portlets that are in use and tries to register them in the portlet_manager tool. You can check this out for yourself to see if the friendly names that SimplePortlet has come up with is good enough for you.

The layout form only accepts these friendly names to protect users from typing in the wrong names which will break at least the current folder. When that does happen, you will have to go to that folder as an admininstrator in ZMI and change the properties for that folder (left_slots and right_slots).

Document Actions
Powered by Plone