Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home News & views Empty Portlets: To See or Not To See

Posted May 06, 2009

Empty Portlets: To See or Not To See

by Michael Miller
— filed under: ,

Displaying empty portlets.

Ever have an events or collection portlet that you wished wouldn't disappear?  Maybe it wrecked your three column layout...or took with it the only home page link to a news or events section of your site.  How about a portlet with the option to show itself even when there are no events or items to display?

Recently one of our partners provided a use case for such a portlet.  What they need is a collection portlet that continues to appear even when it is empty.  The portlet itself provides a link to the events section of their site, as well as a list of the events for the coming week.  Instead of disappearing when the collection is empty, the portlet should not only appear, providing the necessary link, but also display a message such as 'No events scheduled this week'.

That Plone's news, events, and collection portlets by default simply disappear when empty, is certainly a better option than having half formed portlets, with no content, popping about.  But I'd like to see the option provided to users. 

This could be achieved by adding a check box to the relevant portlets, allowing users to choose if a portlet should appear when empty or not.  Further, including an additional text field could give users a place to input a custom message for the portlet to display when it has no items

.

Is anyone else looking for similar functionality from Plone's portlets?   Take a look at the example images below and related ticket #9165 at plone.org, with suggested code details.   I'd like to hear your ideas, pros/cons, and any further suggestions.

emptyportlet_display

Suggested collection and events portlets appearing empty with custom messages

empty portlet form suggestion

Suggested additions to Events Portlet

Document Actions

i18n

Posted by Enzo Cesanelli at May 08, 2009 07:35 PM
Great idea as option! it should be internazionalized too...
Need help now?

Immediate assistance is available during university work hours:

News & views…
Posted Oct 13, 2009 Portlets gone wild with ContentWellPortlets 2.0.1 This new release adds the ability to add portlets to the footer area. It also has 6 portlet managers per area. This means 20 total portlet managers including the 2 on the sides that ship with plone.
Posted Sep 17, 2009 Plone 4 – An interview with Zope News Jan Ulrich Hasecke interviews me for Zope News.
Posted Aug 31, 2009 Web Services API for Plone Alpha 3 Release Details the release of the wsapi4plone.core package and the plans for future releases. The final report of the AtomPub for Plone Google Summer of Code project.
Posted Aug 28, 2009 Content editing and creation in Plone is faster with archetypes.schematuning Some bench marks of content editing and creation in Plone with and without archetypes.schematuning installed.
More news & views…