css javascript Jahia 7.3 Jahia 8

Include css/javascript from a third party folder from a module


How can I include a css/js file from another folder as css or javascript in the module?


As other folders are blocked in the module. You have to add the folder where the css/js is stored to the static resources in manifest (pom.xml) of the module like (e.g. the additional folder is vendor):


Now the css file will be available. Now you can use the addTemplate tag. NOTE: the addTemplate tag base the css folder!!

So you have to add something like:

 <template:addResources type="css" resources="../vendor/myVendor.css" />