Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Amit Kumar Singh
How to get ColumnId from page Layout ?
February 14, 2011 12:22 AM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

Hi,

How to get column id from the page layout. Like user has dragged the portlet in 2nd column that time i want to get the column id "column_2". Is it possible to get coulmn id dynamicall or not. Let me know if anyone have idea to get the column id.

Thanks.
Faris Abdulla
RE: How to get ColumnId from page Layout ?
February 14, 2011 1:16 AM
Answer

Faris Abdulla

Rank: Regular Member

Posts: 183

Join Date: September 1, 2009

Recent Posts

Hi Amit,

You can get it from Layout object. Get the current layout and get the type settings.

layout.getTypeSettings()

The value in Layout table column typeSettings seems like this:
layout-template-id=2_columns_ii
column-2=56_INSTANCE_1Xdq,
column-1=58

Which mentions the column and the portlet reside in particular column.
Amit Kumar Singh
RE: How to get ColumnId from page Layout ?
February 14, 2011 1:38 AM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

i need to get the column id in javascript while dragging portlet. Right now, i have fixed the column. But i do not want to fix the column. Please let me know if you have idea to get column id in javascript.

Thanks.
Renata Siega
RE: How to get ColumnId from page Layout ?
March 1, 2013 9:28 AM
Answer

Renata Siega

Rank: Junior Member

Posts: 34

Join Date: October 29, 2012

Recent Posts

Amit Kumar Singh:
i need to get the column id in javascript while dragging portlet. Right now, i have fixed the column. But i do not want to fix the column. Please let me know if you have idea to get column id in javascript.

Thanks.


Did you find the solution?
Amit Kumar Singh
RE: How to get ColumnId from page Layout ?
June 8, 2013 12:38 AM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

Renata Siega:
Amit Kumar Singh:
i need to get the column id in javascript while dragging portlet. Right now, i have fixed the column. But i do not want to fix the column. Please let me know if you have idea to get column id in javascript.

Thanks.


Did you find the solution?


I did not find better solution with JavaScript but you can use below option in your java code to get the render portlet column id.

String columnId = ParamUtil.getString(renderRequest,"p_p_col_id","column-1");