[opencms-dev] Using a CSS Stylesheet in OpenCMS 5.01

Olli Aro olli_aro at yahoo.co.uk
Sat Feb 12 00:16:28 CET 2005


Not sure if you mean using stylesheet for website for the WYSIWYG editor.

If website template you can just use:

<link type='text/css' rel='stylesheet'
href='/opencms/opencms/system/modules/nl.bodyplan.site/resources/bps.css' />

and to automatically pick up the static export path or modified web app
path:

<link type='text/css' rel='stylesheet'
href='<link>/system/modules/nl.bodyplan.site/resources/bps.css</link>' />
(if XML template)

<link type='text/css' rel='stylesheet'
href='<cms:link>/system/modules/nl.bodyplan.site/resources/bps.css</cms:link
>' /> (if JSP template).

If you want to force style in WYSIWYG then for version 5 you can do:

<STYLESHEET>/system/modules/nl.bodyplan.site/resources/bps.css</STYLESHEET>
immediately after the first <XMLTEMPLATE> tag. 

For version 6 this is defined as a file property for the template file.

Hopefully this helps,

Olli



-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of visser arthur
(02VOEMDIAHTKAND)
Sent: 11 February 2005 23:06
To: opencms-dev at opencms.org
Subject: [opencms-dev] Using a CSS Stylesheet in OpenCMS 5.01

I've created a template and tried to include a CSS stylesheet using the
following line of code in the XML template file:

<stylesheet>../system/modules/nl.bodyplan.site/resources/bps.css</stylesheet
>

The bps.css is a plain text file stored in /resources/ (I attached it to
this mail as bps_css.txt, in OpenCMS it's called bps.css). 
The stylesheet does not seem to work. Can anyone tell me how to 'activate' a
stylesheet in a template? What properties are required?
Is this the correct syntax for stylesheets in OpenCMS?
Thanks for your help or suggestions.

OpenCMS 5.0.1
XP Home SP2
Java SDK 1.4.2
Tomcat 5.0.18

Arthur

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 07/02/2005
 
    

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 07/02/2005
 




More information about the opencms-dev mailing list