Foren

One Portlet - Multiple Layouts

Jochen Kögel, geändert vor 15 Jahren.

One Portlet - Multiple Layouts

New Member Beiträge: 2 Beitrittsdatum: 25.02.09 Neueste Beiträge
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
thumbnail
Victor Zorin, geändert vor 15 Jahren.

RE: One Portlet - Multiple Layouts

Liferay Legend Beiträge: 1228 Beitrittsdatum: 14.04.08 Neueste Beiträge
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.