Managing the Site: Making a new area for the right or left columns
Initially, in the CPSR site there were two "static portlets". A static portlet is the individual area of the right or left column. It consists of a template that controls how the portlet is presented, and a content page, that provides the text, links, etc that is presented in the column. If you want to change an existing area of one of the columns, please see the tutorial here.
The original schema has templates called leftPortlet and one called rightPortlet which loads the pages of content called leftPortletContents and rightPortletContents respectivly (these are documents located in the root of the Plone site).
To add another portlet, the following steps should be done:
- First, enter the ZMI ( >Plone Setup > ZMI).
- Navigate to the portal skins folder:
- Create the portlet. That is done by creating a Page Template (from the dropdown list, select Page Template) in the ``portal_skins/custom`` directory. Delete the default content and replace it with the following contents:
tal:condition="exists: here/path/to/document | nothing">
<div class="portlet" id="myPortlet">
<div class="portletBody"><tal:block replace="structure here/path/to/document/CookedBody">Body</tal:block></div>
The important things to change here are ``path/to/document`` which should be changed to the whole path to where the document to be loaded is (note: ``path/to/document`` occurs several times). For example, if you will create a file in the root directory called newPortlet, then change the path to /newPortlet. The id (that in the example is myPortlet) of the div tag of class portlet should be changed to something that is unique (ids should be unique) to the whole site.4. Then, go to the root of the Plone site (in the ZMI), click on "properties" (tab across the top) and add the portlet slot (either to the left slot (ie column) or right slot (column) like this:
Where myPortlet is the name given to the page template in the
previous step. After adding the line, press Save.
5. Then all that is needed is creating the content page. From the
Plone interface (note that you can change from the ZMI to the Plone by
clicking the View tab), navigate to the directory you specified as the
location for your content (ie / for root). Click "add new item" and
select "web page". Fill in the fields for this page (specifying the id
in the short name), putting in the information to be shown. Once you
have finished adding the content, press "save". Review the content you
added and make any corrections needed (press the "edit" tab to make any
changes). You portlet should now display in the column that you
specified in step (4).
You can also see another tutorial here on the same issue.
Last modified April 20, 2005 11:52 PM