Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Mikko Torri
Setting "layout specific" portlet preferences
March 12, 2012 4:36 AM
Answer

Mikko Torri

Rank: Junior Member

Posts: 33

Join Date: May 9, 2011

Recent Posts

Hi

I'm wondering if there is a bug in 6.1 ga 1 regarding portlet preferences?

When ever I add a non-instantiable portlet to a page, the preferences are shared between all "instances" of the same portlet on different pages.
For example on page A is calendar portlet and on page B is also calendar portlet.
Setting display properties on page A causes the display properties on page B to change too.

This worked in 6.0.6.!

When looking at the database, I see that the portletpreferences table has multiple rows for portletid='8' (the calendar portlet) but the only row that gets updated is the row with ownertype=2 (group). In 6.0.6 the preferences were changed to ownertype =3 (layout).

Related to this I created this Jira entry about blog preferences being reset

Mikko
Dhrutika Vyas
RE: Setting "layout specific" portlet preferences
March 12, 2012 5:01 AM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 438

Join Date: February 9, 2009

Recent Posts

Hi ,
You can overwrite liferay-portlet.xml of the portlet for which you want to set different preferences for different pages.

Set <preferences-unique-per-layout> false</preferences-unique-per-layout>

Hope this helps. For details see below description.
<!--
Set the preferences-unique-per-layout value to true if the preferences for the
portlet are unique across all pages. If set to false, the preferences for the
portlet are shared across all pages. The default value is true.

The preferences-unique-per-layout element is used in combination with the
preferences-owned-by-group element. See the comments for the
preferences-owned-by-group element for more information.
-->
<!ELEMENT preferences-unique-per-layout (#PCDATA)>

Regards,
Dhrutika
Mikko Torri
RE: Setting "layout specific" portlet preferences
March 12, 2012 5:19 AM
Answer

Mikko Torri

Rank: Junior Member

Posts: 33

Join Date: May 9, 2011

Recent Posts

Thanks Dhrutika, it seems that preferences-unique-per-layout is set to false by default for the calendar portlet in 6.1.

Mikko