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: Managing Javascript Files in LR7
Hello everyone!
I have a very simple question, though I have got a feeling that the solution will not be that simple:How can I define globally available .js files in LR7?What do I mean by globally? We come from Liferay 6 and we had some .js libraries included in a hook, which basically does nothing more than adding the js files to html/js/
path in the deployed application. All we then had to do was adding the files to the porta-ext.properties property javascript.everything.files= and we were done.
Now this property still does exist in LR7 (javascript.everything.files=), but where and how do I have to place my javascript files in order for them to be appended to everything.js in /html/common/themes/top_js.jsp?
Best RegardsRobert
I have a very simple question, though I have got a feeling that the solution will not be that simple:How can I define globally available .js files in LR7?What do I mean by globally? We come from Liferay 6 and we had some .js libraries included in a hook, which basically does nothing more than adding the js files to html/js/
path in the deployed application. All we then had to do was adding the files to the porta-ext.properties property javascript.everything.files= and we were done.
Now this property still does exist in LR7 (javascript.everything.files=), but where and how do I have to place my javascript files in order for them to be appended to everything.js in /html/common/themes/top_js.jsp?
Best RegardsRobert
We always just added such things to our theme, but maybe a theme contributor could solve your requirement:
https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/theme-contributors
https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/theme-contributors
Hi Christoph!Thank you for the link. Though it might not provide the exact same functionality as the hook in LR6 it still is pretty much what I am looking for.I am still wondering though why the propertyjavascript.everything.files=
Still exists if it can be overwritten like in LR6.
Still exists if it can be overwritten like in LR6.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™