$theme is available in scripts environments (velocity...), that is not the
case for css.
You could either "render" your css file and use the result, or create an
object StyleSheetExtension : you have an option to get it parsed
automatically.
Br,
Jerem
Le 28 janv. 2013 17:43, "Naoufel Chbihi" <Naoufel.Chbihi(a)ssc-spc.gc.ca> a
écrit :
Hello
I have created a custom CSS file (/xwiki/skins/myskin/css/mystyle.css) and
I created a Velocity template to reference this css file
(/xwiki/skins/myskin/templates/customcss.vm). Inside the Velocity
template, I have the line
<link rel="stylesheet"
href="$xwiki.getSkinFile('css/mystyle.css')"/>
and it works fine.
Now I want to able to use the $theme variable inside my CSS file to use
attributes like $theme.pageBackgroundColor and $theme.textColor;. However,
I can't seem to get the theme variable to be passed into the CSS file. All
references to these attributes return a null value inside the CSS file.
In the customcss.vm file, I added the line $theme.menuLinkColor for
debugging purposes and it returns a non-null value. So, I know that the
value of this variable is available within the Velocity template.
Does anyone know how I can do this?
Thank you.
Naoufel Chbihi
Technical Specialist | Spécialiste technique
Mainframe Operating System Technology | Technologie du système
d'exploitation des ordinateurs centraux
Service Management & Delivery (SM&D) | Gestion et prestation des services
(GPS)
Information Technology Services Branch (ITSB) | Direction générale des
services d'infotechnologie (DGSIT)
Shared Services Canada | Services partagés Canada
7038-700 Montreal Road, Ottawa, ON K1A 0P7 | 7038-700, chemin Montréal,
Ottawa, ON K1A 0P7
Tel.: 613-748-2169
Fax: 613-748-2617
E-mail: naoufel.chbihi(a)ssc.gc.ca | naoufel.chbihi(a)spc.gc.ca
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users