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
RE: Use theme configuration in a Layout
Hi, I would like to know if it is possible to use theme configuration in a Freemarker Layout? I followed all the steps of this doc (https://portal.liferay.dev/docs/7-2/frameworks/-/knowledge_base/f/making-configurable-theme-settings), but I cannot recover the configuration in my Layout. Is this normal? It is only possible to use the configuration outside of Layouts, as in portal-normal.ftl? Thanks for your help
You could in the theme portal_normal throw a 0px height div into the HTML like div id="theme-settings" and attach all kinds of classes to it then use jQuery hasclass() in the layout to see if the page contains certain theme settings.
That should work for ADT (widget templates) and web content templates and fragments too.
That should work for ADT (widget templates) and web content templates and fragments too.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™