Page 1 of 1

My images will not show up

Posted: Sun Dec 02, 2012 2:13 am
by misstheresa2009
Hi Everyone,

I am trying to port over a static html template into CMS Made Simple and I am having a problem getting my images to show up. Before this I kept getting an error saying that {stylesheet} was an unknown tag. I changed it to the new {cms stylesheet} and the error went away. The page now shows up but none of the images can be found. This is very upsetting to me.

Can someone tell me which folder these are supposed to go into? I looked at two videos on YouTube and the answer still is not clear to me.

Re: My images will not show up

Posted: Sun Dec 02, 2012 3:53 am
by Wishbone
With {stylesheet}, it was calling a stylesheet script from your root directory. Now, with {cms_stylesheet} the cached stylesheets are in the /tmp directory, so all images are relative to there.

Use [[root-url]] in your stylesheets.. Example:

Code: Select all

#background {
  background-image: url([[root-url]]/uploads/images/back.jpg);
}

Re: My images will not show up

Posted: Sun Dec 02, 2012 5:49 am
by misstheresa2009
Wishbone wrote:With {stylesheet}, it was calling a stylesheet script from your root directory. Now, with {cms_stylesheet} the cached stylesheets are in the /tmp directory, so all images are relative to there.

Use [[root-url]] in your stylesheets.. Example:

Code: Select all

#background {
  background-image: url([[root-url]]/uploads/images/back.jpg);
}

It worked! I can see all of my images now. Thank you!