<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: access cms content in css file</title><link>https://answers.axonivy.com/questions/1611/access-cms-content-in-css-file</link><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;is it possible to access cms content in css files?
I have tried something like that:
&lt;/p&gt;&lt;pre&gt;.info {
    color: "#{ivy.cms.co('/Layouts/color/info')}"
}
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1611/access-cms-content-in-css-file" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 30 Dec 2015 09:02:57 -0500</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/1611/access-cms-content-in-css-file/1612</link><description>&lt;p&gt;Yes I tried your example and it worked for me. The css must be included in the xhtml like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;...
&amp;lt;h:outputStylesheet name="styles/styles.css" /&amp;gt;
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For the sample css include above the css file would be located in the project under:  webContent/styles/styles.css&lt;/p&gt;
&lt;p&gt;But to get a correct color value in css you have to remove the &lt;em&gt;"&lt;/em&gt; around the expression like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.info {
    color: #{ivy.cms.co('/Layouts/color/info')}
}
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Wed, 30 Dec 2015 09:02:57 -0500</pubDate><guid>https://answers.axonivy.com/questions/1611/access-cms-content-in-css-file/1612</guid></item></channel></rss>