Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi,

I am wondering if there's a way to get variables to work in an external CSS file.

Code below:
Code: Select all
.logo-banner {
        background-image:url(<cms:get_custom_field 'company_logo' masterpage='site-settings.php' />),
                         url(<cms:get_custom_field 'website_image' masterpage='site-settings.php' />);
        background-position:80px 40px, top left;
        background-repeat:no-repeat, no-repeat;
        background-size:200px, 100%;
      }



If this placed in the head section of a page it works fine. In CSS it just outputs as written. Is this possible?
Bit of a pain to paste this into every template rather than edit it in one place and applied everywhere.

Hope I've explained this well enough.

Regards
Ian
It could be a separate couch-managed php file serving CSS content as in viewtopic.php?f=2&t=7406 Best variant if admin should be able to change theme from admin panel.

Or it could be a simple embeddable CSS code via a snippet injected into <head> section. Best variant to quickly edit code from a single point. I personally love this approach and use it with <cms:smart_embed> tag.
Thanks trendoman, the smart embed looks interesting. Will get it going through 1 of these options.
3 posts Page 1 of 1
cron