Page 1 of 1

Re: Adding Images to my own template

Posted: Tue May 28, 2013 5:52 pm
by Wishbone
If you are referring to images in your CSS, make sure you do something like:

Code: Select all

body {
  background-image: url([[root_url]]/uploads/images/body.png);
}
Note that the images are relative to your tmp/cache directory, and not the document root.

Re: Adding Images to my own template

Posted: Tue May 28, 2013 6:56 pm
by velden
For style sheets:

Code: Select all

body {
  background-image: url([[root_url]]/uploads/images/body.png);
}

OR 

body {
  background-image: url([[uploads_url]]/images/body.png);
}

within template

Code: Select all

<img src="{uploads_url}/images/example.jpg" class="whatever" alt="what you like" width="100" height="20" />

etc.etc.
I personally like to create an 'uploads/template/images' folder to make a distinction between 'user/content' images and 'template' images.

Re: Adding Images to my own template

Posted: Wed May 29, 2013 7:29 pm
by Wishbone
velden wrote:I personally like to create an 'uploads/template/images' folder to make a distinction between 'user/content' images and 'template' images.
I do something similar... uploads/images/site for template images.

Re: Adding Images to my own template

Posted: Wed May 29, 2013 8:13 pm
by Dr.CSS
I use the /uploads/themefolder scheme also, I don't put them anywhere in the /uploads/images as anyone editing pages can choose from there, I also put all my JS files in uploads/js...