Foren

How to create page with a portlet from config file?

thumbnail
Richard Oliver Legendi, geändert vor 11 Jahren.

How to create page with a portlet from config file?

Junior Member Beiträge: 35 Beitrittsdatum: 30.11.09 Neueste Beiträge
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!
thumbnail
Samuel Kong, geändert vor 11 Jahren.

RE: How to create page with a portlet from config file?

Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
Try taking a look at these portal properties

layout.static.portlets.start.column-x[yyy]
layout.static.portlets.end.column-x[yyy]
default.guest.public.layout.column-x
default.user.private.layout.column-x
default.user.public.layout.column-x
thumbnail
Richard Oliver Legendi, geändert vor 11 Jahren.

RE: How to create page with a portlet from config file?

Junior Member Beiträge: 35 Beitrittsdatum: 30.11.09 Neueste Beiträge
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?
thumbnail
Samuel Kong, geändert vor 11 Jahren.

RE: How to create page with a portlet from config file?

Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
You can't do it from a config file, but would site templates work for you.
thumbnail
Richard Oliver Legendi, geändert vor 11 Jahren.

RE: How to create page with a portlet from config file?

Junior Member Beiträge: 35 Beitrittsdatum: 30.11.09 Neueste Beiträge
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.
thumbnail
Samuel Kong, geändert vor 11 Jahren.

RE: How to create page with a portlet from config file?

Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
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.
thumbnail
Richard Oliver Legendi, geändert vor 11 Jahren.

RE: How to create page with a portlet from config file?

Junior Member Beiträge: 35 Beitrittsdatum: 30.11.09 Neueste Beiträge
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.