This website uses cookies to ensure you get the best experience. Learn More.
Tip of the Day - Portlet Setup Archive
Creating configurable portlets allow site administrators to customize the behaviour of the portlet the way they want to. The core feature set can be expanded dynamically by changing the portlet preferences. You could, for instance, change the email address where customer feedback is delivered, change the display styles of asset publishers or even disable some features if needed. Using portlet configuration services offered by Liferay should be in the toolbox of every Liferay Developer. In a recent discussion, my colleague here at Ambientia told me about this nice little feature called portlet setup archive. By using the archive you can save the portlet’s preferences and restore them to different instances of the same portlet. This was no news to me, I had done that before, for example when configuring asset publisher, experimenting with some advanced setup, always keeping the original as a backup.
What I did not know was that when you archive the portlet setup, you get the preconfigured versions of the portlet also to the Liferay’s Add menu, under the application itself. This is extremely helpful in cases where you’d want to use the same setup in different pages. You do not need to restore the archived setup manually after adding the portlet to your page, you can add the configured portlet directly from the add menu.
And what’s even more awesome is that the archive feature does not limit itself to Liferay core portlets only. If you use portlet preferences in your own custom portlets, it is just as easy to archive the setup and add the preconfigured portlets to any page you want to. It needs no extra configuration, the link is added automatically to the user interface. Talk about a nice feature, eh?