Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to get friendly URL in Liferay DXP ?
We have the "com.liferay.portal.kernel.model.Layout" Object. Using this object we need to find its friendly URL. The PortalUtil.getLayoutFriendlyURL() needs the 'ThemeDisplay' object and we can't create that object. The PortalUtil.getLayoutActualURL() gives something like this "localhost:8080/c/portal/layout?p_l_id=923&p_v_l_s_g_id=45" etc. But we need to get the friendly URL to the page (layout) like "localhost:8080/web/guest/for-business/technology" .
How to create the Friendly URL without ThemeDisplay Object provided the Layout Object ?
How to create the Friendly URL without ThemeDisplay Object provided the Layout Object ?