掲示板

Multiple Portlets, is it Possible ?

12年前 に Zohaib Jabbar によって更新されました。

Multiple Portlets, is it Possible ?

New Member 投稿: 3 参加年月日: 12/03/14 最新の投稿
Environment: LifeRay 6.1 bundled with Tomcat, development using LifeRay IDE for Eclipse

I have successfully deployed custom portlets and themes on liferay portal. Now the problem is that the portal should have three columns and the user should be able to add portlets in column 1 and column 3. Column 2 might be having some static content for example image.

I have created and deployed new theme. In the new theme I have modified portal_normal.vm file and now it contains a table with three columns But clueless how to tell Liferay about the multiple portlet containers.

eg portal_normal.vm file includes layout.jsp ($theme.include($content_include). I have included layout.jsp inside column 1 and thus able to add portlets in column 1, however I also need to add portlets in column 3.

Any help is highly appreciated, even if someone can give me some right direction.

thanks !

Please let me know if there is any confusion in the question !
12年前 に Venkat Koppavolu によって更新されました。

RE: Multiple Portlets, is it Possible ? (回答)

Junior Member 投稿: 85 参加年月日: 10/07/26 最新の投稿
Just confirmation on what you want to achieve

1. Need 3-column layout for page
2. 1 and 2 columns has facility to add some port-lets from Add application
3. 3 column has some static content(might be admin/default portlet) and it will be locked so that other users can't be add any portlets in that column.

Have seen personalization feature in 6.1?
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/page-creation-and-manageme-3

If your are not using same version, to achieve this feature is little bit difficult in 6.0 version, Hope these will give some directions to achive

Step-1 add following properties in portal-ext.properties
.layout.template.id=3_columns_iii
layout.static.portlets.start.column-3[community]=3
#layout.static.portlets.end.column-3[community]=23

Each page has default 3 column layout and every page in the community has 3,23 port-lets in 3-column by default

Step-2 Use LayoutListener by hook implementation and restrict any updates in the column-3
public void onBeforeUpdate(Layout newLayout) throws ModelListenerException {
//Get old layout info
Layout oldLayout = LayoutLocalServiceUtil.getLayout(newLayout.getPlid());
LayoutTypePortlet oldLayoutTypePortlet = (LayoutTypePortlet) oldLayout.getLayoutType();
List<Portlet> oldPortlets = oldLayoutTypePortlet.getAllPortlets("column-3");

//Get new layout info
LayoutTypePortlet newLayoutTypePortlet = (LayoutTypePortlet) newLayout.getLayoutType();
List<Portlet> newPortlets = newLayoutTypePortlet.getAllPortlets("column-3");

//set oldPortlets to newLayout object
}
12年前 に Zohaib Jabbar によって更新されました。

RE: Multiple Portlets, is it Possible ?

New Member 投稿: 3 参加年月日: 12/03/14 最新の投稿
Bundles of thanks Venkat.
I am using Liferay 6.1, so got my questions answered by the first link that you provided.

Now I am googling to find a new way to create new Layout. Kindly guide/share some link if you can.
Moreover is there some good LifeRay tutorial/book/best practices guide that I should read before starting development.

Again, Bundle of thanks for your time, your first link solved the problem.
12年前 に Venkat Koppavolu によって更新されました。

RE: Multiple Portlets, is it Possible ?

Junior Member 投稿: 85 参加年月日: 10/07/26 最新の投稿
Here are the some of the links which i know

Layout Developement
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Layout+Template

Theme Development
http://www.packtpub.com/article/advanced-theme-liferay-user-interface-development

6.1 development
http://www.liferay.com/documentation/liferay-portal/6.1/development

Books
http://dev.opnworks.com/downloads/soft/Liferay/Documentation/LiferayinAction.pdf
http://www.blokefood.com/liferay-portal-4.2.1/web/guest/devzone/lifecast
http://www.liferay.com/es/web/richard.sezov/blog/-/blogs/7845213
http://www.manning-sandbox.com/forum.jspa?forumID=642

Make your Life happy with Liferay