You are here: Home / Tools / Website Documentation / Adding Portlets

Adding Portlets

aka Manage Portlets, Navigation, News, Events, Review Lists, Calendar, Log in, Searches, Links and Images, RSS feeds, and much more

Web sites are not built with content alone. Most sites need additional chunks of contextually-relevant information such as navigation boxes, listings of recent items, and other bits of "sidebar" content. In Plone, these small chunks of content are generally known as portlets.

Plone's portlet system makes it easy to place chunks of additional information on your site. Plone ships with a variety of built-in portlets, and you can easily create custom portlets that meet your particular needs. You can associate portlets with different sections of your site, with different content types, and with different groups of users.

In this tutorial we show how to manage the portlets on your web site. You'll learn how to create portlets, to control where they appear on your site, and to customize them.
What's a portlet, anyway?
 
Portlet View.png
A portlet is a chunk of information that can be shown outside of the main content area of a page. In the above screenshot of one of our basic websites, the Navigation, Future Links, Featured Properties and Location boxes are portlets.

 

Show Additional Information to Users and Visitors

Plone's default theme has two portlet managers that control the assignment of portlets on the right and left sidebars of the page. You can place portlets into these slots on the page. It's also possible to add portlet manager slots to a custom theme so that you can display portlets in other areas of the page, but that's beyond the scope of this book. For more information, refer to: http://plone.org/documentation/ how-to/adding-portlet-managers.

 

There are two things that we need to know about portlets before we dive into adding them:
1. Portlets can only be added to portlet managers. (Left and Right Hand Side of the Body text area)  They can't be added into the body content of your pages.
2. Portlets can be assigned to pages and content types, or user groups, and will cascade down through the site hierarchy unless you explicitly block inheritance.

 

Adding portlets

There are three ways to add portlets to your site:
1. Add portlets to specific locations on your site.
2. Add portlets that are associated with specific content types—for example, a portlet that shows on all News Items
3. Add portlets that are shown only to specific groups of users in your site
 
 
.Portlet.png

Plone's built-in portlets

Plone ships with a generous assortment of basic portlets. Here's a quick list of Plone's default portlet offerings:

Calendar portlet: A simple calendar that shows highlights the dates of any upcoming events you have entered on your site
Login: Shows the login box to users who are not logged in
Classic portlet: A wrapper for Zope 2 style portlets
Navigation: Shows the navigation tree to indicate where you are in the site
Collection portlet: Collection results
Review list: Visible only to the users with the Reviewer role. This portlet shows a list of items which have submitted for review inorder to be reviewed prior to publishing
Search: Shows Plone's search box useful if you have chosen to disable the standard search box, and want to show it in a sidebar instead
Recent items: Shows the most recently-published content items on your site
News: Shows the most recently-published News Items on your site
Static text portlet: Shows custom HTML content. This portlet is used often because of it's versitility.

Propertyshelf Manage Static Text Protlet
RSS feed: Shows information from an RSS feed
Events: Shows upcoming, published events on your site
Video Player - Allows you to embed videos into your portlets on your site

In any portlets where this is no information then the portlet will not show up to viewers.  You can choose to delete the portlets you do not want simply by clicking the red "X" next to them. CAUTION: BEFORE YOU DELETE THE LOGIN PORTLET, MAKE SURE YOUR THEME HAS AN ALTERNATIVE LINK TO LOG IN!!! You can also arrange the order of the portlets by clicking the up or down arrows next to the portlet.

Once you have added the portlets you want on your site and have put them in an order that suits your needs, click Save Settings.  Your portlets will now show up on all of your pages.

• Login: Shows Plone's login box to anonymous users; is hidden if a user is already logged in
• Collection portlet: Shows the results of a Collection • Review list: Visible only to the users with the Reviewer role; this portlet
shows a list of items that users have submitted for review before publishing
• RSS feed: Shows a list of items in an RSS feed
• Classic portlet: A wrapper for Zope 2 style portlets, which may have been developed prior to the advent of Plone 3 and its new portlet system
• Calendar portlet: Shows a simple calendar that highlights the dates of upcoming events for your site
• Search: Shows Plone's search box useful if you have chosen to disable the standard search box, and want to show it in a sidebar instead
• Recent items: Shows the most recently-published content items on your site
• News: Shows the most recently-published News Items on your site
• Static text portlet: Shows a chunk of static, editable HTML content; this is one of Plone's most versatile and useful portlets
• Navigation: Shows the navigation tree • Events: Shows upcoming published events on your site
You're only likely to use Classic portlets if you are using an add-on product that hasn't fully embraced the new style of building portlets, or if you are building your own custom portlets.

Adding portlets to specific sections of your site

We'll start with adding portlets to a specific section of your site, as this is the most common and the simplest thing to do.
Log in to your site (via the Log in portlet) and look at the bottom of the rightmost sidebar for the Manage portlets link.
This will take you to the Manage portlets screen.
Propertyshelf MLS Webservices Manage Portlets

Managing Portlets Peacefully

Because you were on the front page of your site, when you clicked the Manage portlets link, you are now managing the portlets for your entire site. If you only want to manage portlets for a single section of your site, first navigate to that section, and then click the Manage portlets link. The header of the Manage Portlets screen will tell you which section of the site you are in.
The Manage Portlets screen tells you that certain portlets are already assigned to all of the pages of your site. In the example above, the left sidebar portlet manager has the Navigation portlet and the Log in portlet. The right sidebar portlet manager has the Review List, News, Events and Calendar portlets. In order to customize them for a specific page first block parent portlets, and then add your custom portlets.

Moving and Removing Portlets

You can move existing portlets around within a portlet manager by clicking on the up and down arrows within the portlet. You can remove portlets on the portlet manager by clicking on the red X.

Propertyshelf MLS Webservices Manage Portlets

To add a portlet to your site, select the Add portlet... drop-down menu at the top of either the right or left sidebar, and choose a portlet type to be added. For practice, let's try adding a static content portlet to the right sidebar.
Propertyshelf Manage Static Text Protlet
This screen contains the familiar TinyMCE powered rich text editing widget, along with:
• A Portlet header (title) field.
• A Portlet footer field.
• A optional hyperlink field, which will be clickable from the portlet header and footer.
• An Omit portlet border checkbox. If selected, this hides the portlet header, footer, and border. This is very useful if you only want to place an image or some floating text in your sidebar.
Enter some text into your new portlet, click on the Save button at the bottom of the screen, and then click on the Home tab to return to your site's homepage. You should now see your new static text portlet. If you click around the site, you'll continue to see the portlet on all of the pages of your site.

Add RSS Feeds

All of our Propertyshelf Collections (aka Search Result Pages by customizable Search Criterias) has the following option on the buttom of the results
Basically Our Collections generate RSS feeds for the search result items on your site
Propertyshelf MLS Webservices Manage Side bars
By clicking on the RSS Feed Text the following page appears:

Propertyshelf MLS Webservices Manage Portlets

Simply Copy (Control and C) the URL and go to your manage Portlets section

then Select Add RSS Feed Portlet from the add portlet option and paste (Control and V) the URL into the field as shown below

  • You can apply a Title if you do not like the standard title provided by the RSS source:
  • Also you can limit to how many items to display
  • How many minutes it takes till updates itself (please keep this as the default setting)

Propertyshelf MLS Webservices Manage Portlets

Note:   if you manage portlets on the home folder it will inherit to all pages on your entire site,  if you set a portlet under a sub folder it will only inherit for content within that folder and any content within that.

Hiding a Portlet

Becasue portlets that you assign at the top levels of your site will cascade down the site hierarchy and will appear on all of the objects at lower levels, you may want to hide them on some of the lower pages.  So, the idea of portlet blocking is that, at any place in your site, you can hide the portlets that would otherwise be inherited from parent locations, user groups, or content types. This provides you with great flexibility in how and where portlets should appear on your site.

First, go to the page you would like to block the portlets from showing up on.  Click on the Manage Portlets link.  You will enter the Manage Portlets screen.  On the side you would like the portlets to be hidding, you should see somthing like the following:

Portlet.png

Under the Parent Portlets section there is a drop down with the choices to Block or Unblock.  If you choose Block, all of the portlets from higher levels will be blocked.

The same applies for Group or Content types as well.