« Back

Adding page-level JavaScript

To add page-level JavaScript (for example pointing to the JWPlayer) the file liferay-portlet.xml needs to be edited.

The script is referenced in a line of XML using <header-portlet-javascript> within a <portlet>:


Once the change is made (and the script is in the correct location on the server or remotely) the server should be restarted to pick up the change.

Similar settings can be applied for CSS, etc.

0 Attachments
Average (1 Vote)
The average rating is 5.0 stars out of 5.