I’d like to load all my javascript at the bottom of each page, but in liferay, I’m limited to <header-portlet-javascript>, which places the javascript in the header.
If I include the JS manually at the bottom of each relevant JSP, I wind up duplicating a number of <script> includes.
What’s the best way to achieve what I need? I have a number of portlets that all require the same set of javascript libraries, some of which are large, and I’m targetting mobile devices, so every byte counts.
You get access to how the whole page of HTML is generated in your theme, in templates/portal-normal.vm. Change this to adjust to your requirements.