(For more resources on Plone, see here.)
A portlet is a chunk of information that can be shown outside of the main content area of a page. In the following screenshot of Plone’s default home page, the Log in box and the calendar are portlets.
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:
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:
You’re likely only 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.
Many add-on products for Plone will supply one or more relevant portlets when the product is installed.
There are also additional standalone portlets available as separate add-on products. Among the most useful standalone add-on portlets are:
These products can be found in the Products section of Plone.org.
There are three ways to add portlets to 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.
Managing Portlets Peacefully
Because you were on the front page of your site, when you clicked on 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 on 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.
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 a portlet from the portlet manager by clicking on the red X.
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.
This screen contains the familiar Kupu-powered rich text editing widget, along with:
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.
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…