掲示板

Setting "layout specific" portlet preferences

12年前 に Mikko Torri によって更新されました。

Setting "layout specific" portlet preferences

Junior Member 投稿: 33 参加年月日: 11/05/10 最新の投稿
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
thumbnail
12年前 に Dhrutika Parekh によって更新されました。

RE: Setting "layout specific" portlet preferences

Expert 投稿: 435 参加年月日: 09/02/09 最新の投稿
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
12年前 に Mikko Torri によって更新されました。

RE: Setting "layout specific" portlet preferences

Junior Member 投稿: 33 参加年月日: 11/05/10 最新の投稿
Thanks Dhrutika, it seems that preferences-unique-per-layout is set to false by default for the calendar portlet in 6.1.

Mikko