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
Freemarker Variable not working in Layouts? (7.3)
Hola,
In my 7.2 Liferay CE Portal I used ${user_last_name} in my Freemarker-Layouts (the Layouts you can assign to a page) - for example I got a welcome-Layout where the user is greeted by his full name.
Now with the newest version of Liferay CE Portal I am not able to do this?
Why? How can I achieve this now?
Hi ,
You can get the User Object or Theme Display Object from request and then fetch the user full name.
Ex:
${request.getAttribute("USER").getFullName()}
or
${request.getAttribute("LIFERAY_SHARED_THEME_DISPLAY").getUser().getFullName()}
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™