cancel
Showing results for 
Search instead for 
Did you mean: 

Reading HTML Docs from Dashlet

cedorfm
Champ in-the-making
Champ in-the-making
Hello,

I have created several dashlets, which read the contents of HTML files located in the repository. Inline CSS editing of these HTML files work perfectly fine. However, I want to create an external style sheet, but I don’t know what path to specify?

Path of HTML File:

Sites/HR/page/News/file.html

Path of CSS File:

Sites/HR/page/CSS/file.css

I have specified “../CSS/file.css” in the HTML file, however it doesn’t seem to work? I'm not even certain if this is even possible?

Thank you.
3 REPLIES 3

cedorfm
Champ in-the-making
Champ in-the-making
SOLUTION:

For those who are interested…

HTML…

<style type="text/css" media="screen">
      @import "/share/css/file.css";
</style>

The CSS file has to be placed in Share… tomcat/webapps/share/…

Regards…

pasharik
Champ in-the-making
Champ in-the-making
Is there a way to store css only on the site, not on disk? I tried to use @import for the css that is stored in share. It works, but only in IE. In all other browsers css not avaliable. If css is on the disk /tomcat/vebapps/share…, all works. Is there a solution?

scouil
Star Contributor
Star Contributor
Where did you store it in share?
Have you tried the webscript extensions folder? (accessible via /alfresco/s/yourfile)

Not sure if there isn't a more appropriate way to do it for dashlets though…