Fórum

How to link to another liferay page

thumbnail
Mario Duck, modificado 10 Anos atrás.

How to link to another liferay page

New Member Postagens: 7 Data de Entrada: 11/12/12 Postagens Recentes
I'm trying to figure out how to link to another page within the same liferay site.

Obviously I could hardcode the url in my portlet's view but I'm worried about having to update all of my portlets in case the friendly url changes in the future.

I know the name of the page I'm trying to link to, but what if the page name changes too?

I've found infinity of classes that have methods that return friendlyUrls, such as PortalUtil, LayoutLocalServiceUtil, and even LayoutFriendlyURLLocalServiceUtil, but they all require parameters that I'm not sure how to obtain.

Is there a standard way of obtaining friendly urls in liferay?
thumbnail
sushil patidar, modificado 10 Anos atrás.

RE: How to link to another liferay page

Expert Postagens: 467 Data de Entrada: 31/10/11 Postagens Recentes
Hi ,
There are two ways you can make it configurable so that when there is change in friendly you can change it through configuration so that it is reflected everywhere.
1) Create site settings and in the portlets get it from site settings.
2) put it in the portal properties and get it from there.
i would prefer first option

Regards
Pritesh Shah, modificado 10 Anos atrás.

RE: How to link to another liferay page

Junior Member Postagens: 31 Data de Entrada: 05/07/12 Postagens Recentes
Apart from two option provided by Sushil,
You can also create static util class having static property for your page name. Use that util class at all your files so later on in future your friendly url changes you can update the class property and redeploy the plugin.
tito gutierrez, modificado 9 Anos atrás.

RE: How to link to another liferay page

New Member Postagens: 18 Data de Entrada: 02/07/14 Postagens Recentes
Por favor, no puedo visualizar paginacion en liferay, como hacerlo?