Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Richard Oliver Legendi
How to create page with a portlet from config file?
March 27, 2013 4:13 AM
Answer

Richard Oliver Legendi

Rank: Junior Member

Posts: 35

Join Date: November 30, 2009

Recent Posts

I would like to add a simple public page with only one portlet on it. Is it possible to do that from a config file in Liferay (e.g., in portal-ext .properties)?

Can someone please link any relevant documents (Google wasn't my friend in this issue)? Thanks in advance!
Samuel Kong
RE: How to create page with a portlet from config file?
March 27, 2013 8:32 PM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1424

Join Date: March 10, 2008

Recent Posts

Try taking a look at these portal properties

layout.static.portlets.start.column-x
layout.static.portlets.end.column-x
default.guest.public.layout.column-x
default.user.private.layout.column-x
default.user.public.layout.column-x
Richard Oliver Legendi
RE: How to create page with a portlet from config file?
March 28, 2013 3:17 AM
Answer

Richard Oliver Legendi

Rank: Junior Member

Posts: 35

Join Date: November 30, 2009

Recent Posts

Hi Samuel, thanks for the reply.

Unfortunately, I would like to follow a bit different approach: I don't want to customize the guest/user public-private pages only, but let's say, add an "About" and/or "Download" page directly with 1-1 portlet on it. Is that possible with Liferay?
Samuel Kong
RE: How to create page with a portlet from config file?
March 29, 2013 6:19 AM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1424

Join Date: March 10, 2008

Recent Posts

You can't do it from a config file, but would site templates work for you.
Richard Oliver Legendi
RE: How to create page with a portlet from config file?
March 29, 2013 7:30 AM
Answer

Richard Oliver Legendi

Rank: Junior Member

Posts: 35

Join Date: November 30, 2009

Recent Posts

I'll take a look on them, thanks.

To be honest my goal is to have some sort of default layout (sites + portlets) for Liferay at a clean startup. The reason is that I introduced our full build into a CI lifecycle (don't ask how much work that was...), and running integration tests would be far easier this way. Any suggestions and links on that topic would be highly appreciated.
Samuel Kong
RE: How to create page with a portlet from config file?
March 31, 2013 8:16 PM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1424

Join Date: March 10, 2008

Recent Posts

Some more portal properties you can look into:

default.guest.public.layouts.lar
default.user.private.layouts.lar
default.user.public.layouts.lar

You can also try overriding the addDefaultGuestPublicLayouts method in com.liferay.portal.service.impl.GroupLocalServiceImpl.
Richard Oliver Legendi
RE: How to create page with a portlet from config file?
April 2, 2013 1:19 AM
Answer

Richard Oliver Legendi

Rank: Junior Member

Posts: 35

Join Date: November 30, 2009

Recent Posts

Ok, so I conclude there is no such built-in mechanism in Liferay -- it is a bit disappointing however.

How do you guys solve the publishing of projects from the developer to test, and test to production environments? Do you use customized solutions, or have someone who's job is to create the layout of the site and put all the portlets to its place? :-)

Anyway, thx for the hint Sam, I'll take a look on the addDefaultGuestPublicLayouts() function.