Fórum

Access portal site name from portlet.

Witold Wolski, modificado 11 Anos atrás.

Access portal site name from portlet.

New Member Postagens: 20 Data de Entrada: 06/02/12 Postagens Recentes
Is there a way to access the name of the portal site a portlet was placed on?

regards
Witold
Srikanth Konjarla, modificado 11 Anos atrás.

RE: Access portal site name from portlet.

Junior Member Postagens: 51 Data de Entrada: 25/10/08 Postagens Recentes
Try PortalUtil

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/util/PortalUtil.html
thumbnail
Tanweer Ahmed ., modificado 1 Ano atrás.

RE: Access portal site name from portlet.

Expert Postagens: 322 Data de Entrada: 11/03/10 Postagens Recentes
Witold Wolski:
Is there a way to access the name of the portal site a portlet was placed on?

regards
Witold


Hi Witold,

Are you looking for the page where the Portlet is placed ?

If Yes, You can get it from this code
String layoutName = themeDisplay.getLayout().getName(themeDisplay.getLocale());


Hope this helps,

Regards,
Tanweer
Hiral Ramavat, modificado 11 Anos atrás.

RE: Access portal site name from portlet.

Regular Member Postagens: 103 Data de Entrada: 13/02/12 Postagens Recentes
Hi,

You can get the community name/site name as follow :

String groupName = themeDisplay.getLayout().getGroup().getName();

Hope this will help you.

Thanks,
Hiral