f-angi
5/24/2017 - 8:41 AM

Programmatically retrieves info about friendly url mapping

Programmatically retrieves info about friendly url mapping

long companyId = PortalUtil.getCompanyId(request);
String portletId = PortalUtil.getPortletId(request);

com.liferay.portal.model.Portlet portlet = PortletLocalServiceUtil.getPortletById(companyId, portletId);

String friendlyURLMapperClass = portlet.getFriendlyURLMapperClass();
String friendlyURLMapping = portlet.getFriendlyURLMapping();
String friendlyURLRoutes = portlet.getFriendlyURLRoutes();