留言板
get portlet position
Hi,
I have 3 or more portlets and I need to get the portlets position, when I move them, or change it places I need to know what is the newest position to change its size, to work on Apple/Safari.
Thanx
I have 3 or more portlets and I need to get the portlets position, when I move them, or change it places I need to know what is the newest position to change its size, to work on Apple/Safari.
Thanx
nobody??
Paulo Khouri Carvalho:
Hi,
I have 3 or more portlets and I need to get the portlets position, when I move them, or change it places I need to know what is the newest position to change its size, to work on Apple/Safari.
Thanx
Hi Paulo,
I think you may want to take a look at Liferay Layout Templates. A layout template is a grid that controls the look and feel of a page. You can read more about it on the Liferay wiki: http://wiki.liferay.com/index.php/Layout_Template.
If you still need to know a portlet's position on a Layout you can look at the Layout's typeSettings.
If you put this code in your portlet's view.jsp file:
Your server logs will have something like this:
column-2=portletId1, portletId2
column-1=portletId3
This info tells you where your portlets are located on the page.
I think you may want to take a look at Liferay Layout Templates. A layout template is a grid that controls the look and feel of a page. You can read more about it on the Liferay wiki: http://wiki.liferay.com/index.php/Layout_Template.
If you still need to know a portlet's position on a Layout you can look at the Layout's typeSettings.
If you put this code in your portlet's view.jsp file:
<%
Layout currLayout = LayoutLocalServiceUtil.getLayout(plid);
System.out.println(currLayout.getTypeSettings());
%>
Your server logs will have something like this:
column-2=portletId1, portletId2
column-1=portletId3
This info tells you where your portlets are located on the page.
Where are these infos saved in the database?
Thx
Oliver
Thx
Oliver
Ray Augé,修改在15 年前。
Re: [Liferay Forums][3. Development] RE: get portlet position
Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
These are stored as "properties" in the "typeSettings" field of each
Layout record.
Be careful to handle these values properly as they are not designed to
be processed other than through our UnicodeProperties class/methods on
the Layout object.
Layout record.
Be careful to handle these values properly as they are not designed to
be processed other than through our UnicodeProperties class/methods on
the Layout object.
Oliver Lauer,修改在15 年前。
RE: Re: [Liferay Forums][3. Development] RE: get portlet position
Junior Member 帖子: 83 加入日期: 06-9-16 最近的帖子
Thanks a lot, so I see why I haven't found it. It's a blob field that can't/shouldn't be changed via SQL client.
Cheers
Oliver
Cheers
Oliver