Skip to content

Correspondence Technologies

Sections
Personal tools
You are here: Home » Software » SfIndex Demo » collective - SimplePortlet

Package: collective - SimplePortlet

A product that lets the user create his own portlets in Plone.

a test of SfIndex product

Releases

Release Date Release Name Download
2004-04-22 15:00 SimplePortlet 1.0 beta 1 sourceforge

Package README (CVS ver. 1.2)

About

    SimpePortlet is a product that lets the user create his own portlets in
    Plone.
It adds a new content type called Portlet.
Adding this object 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.

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

Installing

    See install.txt for installation instructions.

Usage

    After installation, two new entries in the left_slots and right_slots
    properties of the portal's folder have been added:

    * '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).

Developers

    If you have a product that also has portlets then you can register them
    with the portlet_manager in your install script::

       # register our portlets to SimpePortlet's portlet manager if it exists
       try:
           pm = self.portlet_manager
       except:
           pm = None
       if not pm==None:
           pm.registerPortlet('<friendlyName>', '<path like
           here/myportlets/macros/portlet>')

    In you uninstall script::

        #unregister portlets
        try:
            pm = self.portlet_manager
        except:
            pm = None
        if not pm==None:
            pm.unRegisterPortlet('<friendlyName>')

I hope you will enjoy this product but use it at your own risk! Make a backup
first!

Note

    Upon uninstalling, SimplePortlet will try to remove all references in each
    folder's left_slots and right_slots to SimplePortlet's
portlets (see above for the two portlets). That means that when you install
SimplePortlet again, you'll have to go
to the folders that had a reference and restore them so that the custom
portlets will be displayed again.

Danny Bloemendaal <br/>
danny.bloemendaal@companion.nl <br/>
_ender_@#plone.irc
 

Powered by Plone

This site conforms to the following standards: