Hi Amir,
I don't know what version of Magnolia you are using, but I'm using
Magnolia 2.1.5 and the relevant layout looks like this:
magnoliaAuthor/templates/jsp/mycompany/
magnoliaAuthor/docroot/mycompany/css/
so my jsp would be here:
magnoliaAuthor/templates/jsp/mycompany/standard.jsp
my css here:
magnoliaAuthor/docroot/mycompany/css/mystyle.css
and my jsp would contain this:
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/docroot/mycompany/css/mystyle.css" />
Hope that helps!
Nicole
Amir Mistric wrote:
Hello
Can someone tell me how to use static resources in templates.
For example, I have a CSS resource in a following folder:
/webapps/magnolia-author/mycompany/style/mystyle.css
Which I want to use in my template located under
/webapps/magnolia-author/mycompany/template/standard.jsp
In standard.jsp (in the head ) I have
<link rel="stylesheet" href="../style/mystyle.css"
type="text/css" />
But this gives me a 404 error...
I also tried
<link rel="stylesheet" href="/style/mystyle.css "
type="text/css" />
<link rel="stylesheet" href="style/mystyle.css "
type="text/css" />
<link rel="stylesheet" href="/mycompany/style/mystyle.css "
type="text/css" />
<link rel="stylesheet" href="mycompany/style/mystyle.css "
type="text/css" />
None of the above works....
Any ideas?
Thanks
Amir
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
Regards,
Nicole Luneburg
Software Developer
--
LISAsoft http://www.lisasoft.com
38 Greenhill Road
Wayville SA 5034
Ph: +61 8 8272 1555
Fax: +61 8 8271 1199
--
The contents of this email are confidential and may be subject to legal or
professional privilege and copyright. No representation is made that this email
is free of viruses or other defects. If you have received this communication in
error, you may not copy or distribute any part of it or otherwise disclose its
contents to anyone. Please advise the sender of your incorrect receipt of this
correspondence.
--
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------