Liferay request current page name
11,194
Solution 1
By using something like that you should be ok
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
String title = themeDisplay.getLayout().getName(themeDisplay.getLocale());
Solution 2
just be aware,themeDisplay.getLocale() could result different char encoding format, use with caution, may cause certain string functions to fail
Author by
layska
Updated on June 04, 2022Comments
-
layska almost 2 years
What is the smartest way to get current page name where request came from? By page I mean the real page name that contains current portlet.
-
Whimusical over 11 yearsAre you sure you mean name and not title?. I never understand the difference, anyway.
-