Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Jochen Kögel
One Portlet - Multiple Layouts
February 25, 2009 3:46 AM
Answer

Jochen Kögel

Rank: New Member

Posts: 2

Join Date: February 25, 2009

Recent Posts

Hello Liferay nerds,

I´m pretty new to liferay development and have a surely simple question.

I´m trying to code a portlet for a list of elements.

The basic page layout is a 4-column layout.
The list view of the portlet should be displayed in one column. This works fine.
If the user selects a list entry, the following detail view should be displayed using 2 columns, and I have no idea how to do this.

Do I have to create a new page via Administration with a different layout and forward to this page?
Can I change the layout of the displaying page dynamically?

Any help on this topic would be apreciated.

Thanks in advance

Jochen
Victor Zorin
RE: One Portlet - Multiple Layouts
February 25, 2009 6:43 PM
Answer

Victor Zorin

Rank: Liferay Legend

Posts: 1178

Join Date: April 14, 2008

Recent Posts

Do not think that changing layout on the fly would be a good idea.

You probably have a couple of options:

option 1. when single portlet represents both functions, ie. rendering of list and rendering of list content. Have list displayed in portlet NORMAL mode, and when selection occurs, you display it in MAXIMIZED mode.

option 2. when two communicating portlets represent functions separately, one rendering of 'list' and another one displaying selected 'item content' . You would have to create two pages:
page 1. where 'list' portlet will be deployed. clicking on list item would redirect user to a second page (not discussing here how you are going to do this, many ways to skin a cat)
page 2. where 'item content view' portlet will be deployed. It would render the details of the element which was selected in the 'list' portlet.