Localhost css images path.

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
vjandrei
Forum Members
Forum Members
Posts: 10
Joined: Mon Jul 04, 2011 11:23 am

Localhost css images path.

Post by vjandrei »

Hi, i work in mamp local and my css files images do not show up.
The are like this.

Code: Select all

.sides {
	background-image: url(images/bg.gif);
	background-repeat: repeat-x;
	background-color: #fff;
}
And the path in safari looks like this
http://localhost:8888/easyholiday/tmp/c ... ges/bg.gif

why it takes tmp/cache/ ??

Code: Select all

root_url		 http://localhost:8888/easyholiday
ssl_url		 https://localhost:8888/easyholiday
root_path		 /Applications/MAMP/htdocs/easyholiday	(0755)
previews_path		 /Applications/MAMP/htdocs/easyholiday/tmp/cache	(0755)
uploads_path		 /Applications/MAMP/htdocs/easyholiday/uploads	(0755)
uploads_url		 http://localhost:8888/easyholiday/uploads
image_uploads_path		 /Applications/MAMP/htdocs/easyholiday/uploads/images	(0755)
image_uploads_url		 http://localhost:8888/easyholiday/uploads/images
ssl_uploads_url		 https://localhost:8888/easyholiday/uploads
Cms versio is 1.10.2
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Localhost css images path.

Post by Wishbone »

The stylesheets are in /tmp/cache. Image paths are always relative to the stylesheet. Instead do:

Code: Select all

.sides {
   background-image: url([[root_url]]/images/bg.gif);
   background-repeat: repeat-x;
   background-color: #fff;
}
This is in the help for {cms_stylesheet}
Locked

Return to “[locked] Installation, Setup and Upgrade”