[SOLVED]How to set a global variable for background paths?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

[SOLVED]How to set a global variable for background paths?

Post by blackhawk »

Within CMSMS 1.11.6, I have the following background property in my style sheet:

Code: Select all

background: url(/dev/uploads/images/socialbar.gif) no-repeat;
But is it possible to do something like this in the style sheet...

Code: Select all

background: url({$bgpath}/socialbar.gif) no-repeat;
...without breaking anything and keeping the front-end code valid?

Thanks
Last edited by blackhawk on Tue May 14, 2013 12:44 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: How to set a global variable for background image paths?

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED]How to set a global variable for background path

Post by Dr.CSS »

You should not need the /dev/ part in image URL calls, {cms_stylesheet} takes [[root_url]]/uploads/../... or ../../uploads/../...
Post Reply

Return to “Layout and Design (CSS & HTML)”