- 
        1. Re: How to share portlet headersmwringe Sep 9, 2013 9:18 AM (in response to infoni)1 of 1 people found this helpfulFor portlet javascript and css files, the recommended approach is to use the gatein-resources.xml file to configure them. 
- 
        2. Re: Re: How to share portlet headersinfoni Sep 10, 2013 11:05 AM (in response to mwringe)Thank you Matt! After a tough fight i was able to define a shared javascript resource in gatein-resources.xml, and link it to my two portlets with a dependency. It works very well: now the javascript resource is included just one time, whatever the number of portlet windows on the page Though i still have troubles with css. I declared this in gatein-resources.xml: <portlet-skin> <application-name>myAppName</application-name> <portlet-name>myPortletReport</portlet-name> <skin-name>Default</skin-name> <css-path>/resources/css/myCustomStyle.css</css-path> </portlet-skin> <portlet-skin> <application-name>myAppName</application-name> <portlet-name>myPortletParameter</portlet-name> <skin-name>Default</skin-name> <css-path>/resources/css/myCustomStyle.css</css-path> </portlet-skin> When i open a page containing "myPortletReport" and "myPortletParameter" (such showed as example in the first post), it nearly works but i have two problems: - Images are not found by my custom css rules. These images are in a relative folder /images (so it is located in my webapp at /resources/css/images). They were correctly taken in consideration with "doHeaders" method but not when using a portlet-skin. It seems the portal shadows the css in a working folder, but i have not found out a way to include an image folder as well.
- It is now including two links such below: one link with an ID myPortletReport, and another with ID myPortletParameter. Thats much better than initial situation which added 4 links, but is it possible to change the setup to include only one link, like for javascript resources?
 http://localhost:8080/portal/skins/3.6.0.Final/myAppName/resources/css/myCustomStyle-lt.css Any idea? Thanks! 
 
    

