0

is there any way in Liferay 6.2 to load all css (or js) files contained in a folder?

This is liferay-portlet.xml example file:

<portlet>
    <portlet-name>Example</portlet-name>
    <icon>/icon.png</icon>
    <instanceable>true</instanceable>
    <header-portlet-css>/css/main.css</header-portlet-css>
    <footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
    <css-class-wrapper>example-portlet</css-class-wrapper>
</portlet>

Can I write something like that (to load all css in myCss folder and all js in myJs folder)?

<header-portlet-css>/myCss/*.css</header-portlet-css>
<footer-portlet-javascript>/myJs/*.js</footer-portlet-javascript>

Thanks

scricci85
  • 43
  • 9

1 Answers1

0

Liferay internaly unify all css and js of portlet in a big main.css and main.js, but is mandatory to specify by portlet the css and js that you want to include in all requests of this portlet.

If you want to unify manually this files maybe you should investigate about grunt or gulp task system.

atrujillofalcon
  • 1,042
  • 1
  • 11
  • 17