[opencms-dev] bvr: Templates with StyleSheets and images

Michael Emmerich m.emmerich at alkacon.com
Wed Sep 21 14:56:17 CEST 2005


Always use the <cms:link> tag and the full path inside of OpenCms if you 
link to anything inside your template - ie. images, stylesheets, weblinks.

So it should look like this:

<link REL="STYLESHEET" TYPE="text/css" 
HREF="<cms:link>/system/modules/com.free.templates.orangetemplate/templates/resources/ 
style.css</cms:link>">

and

<td width="761" height="130" 
background="<cms:link>/system/modules/com.free.templates.orangetemplate/templates/resources/bannerOrange.JPG</cms:link>"> 



Regards,
Michael Emmerich

Alkacon Software



Michael, Nick N schrieb:
> Hi there
> I have a template published here:
> http://www.cmsads.com/opencms/opencms/OrangeTemplateTest/index.html
> 
> 
> I has nice features which I want to make available as an open source 
> template
> 
> However I have a problem I do not know how to get the template to load an
> image and a style sheet from a folder in its associated module
> 
> 
> There is a style sheet filename: style.css
> in a folder named : resources
> full path:
> /system/modules/com.free.templates.orangetemplate/templates/    
> 
> and
> 
> an image bitmap named: bannerOrange.JPG
> in a folder named : resources
> full path:
> /system/modules/com.free.templates.orangetemplate/templates/
> 
> 
> 
> 
> 
> In my template I have the following lines of code for loading the above two
> files
> 
> <head>
> <title><cms:property name="Title" escapeHtml="true" /></title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <link REL="STYLESHEET" TYPE="text/css" HREF="style.css">
> </head>
> 
> and
> 
> <td width="761" height="130"  background="bannerOrange.JPG">   
> 
>  
> 
> 
> What changes to these lines of code must I do to my template to make it 
> load these from their folders in its associated module ?
> 
> 
> 
> With kind regards
> Nick Michael
> tel 2-9032
> cell +27 82-508-1950
> 
> __________________________________________________________________________________________________________________________________
> *Standard Bank Disclaimer and Confidentiality Note*
> 
> This e-mail, its attachments and any rights attaching hereto are, unless 
> the context clearly indicates otherwise, the property of Standard Bank 
> Group Limited and/or its subsidiaries ("the Group"). It is confidential, 
> private and intended for the addressee only.
> 
> Should you not be the addressee and receive this e-mail by mistake, 
> kindly notify the sender, and delete this e-mail, immediately and do not 
> disclose or use same in any manner whatsoever. Views and opinions 
> expressed in this e-mail are those of the sender unless clearly stated 
> as those of the Group. The Group accepts no liability whatsoever for any 
> loss or damages whatsoever and howsoever incurred, or suffered, 
> resulting, or arising, from the use of this email or its attachments.
> 
> The Group does not warrant the integrity of this e-mail nor that it is 
> free of errors, viruses, interception or interference. Licensed 
> divisions of the Standard Bank Group are authorised financial services 
> providers in terms of the Financial Advisory and Intermediary Services 
> Act, No 37 of 2002 (FAIS).
> 
> For information about the Standard Bank Group Limited visit our website 
> http://www.standardbank.co.za
> 
> __________________________________________________________________________________________________________________________________
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list