Calling an image in a subfolder

Calling an image in a subfolder

by José Miguel Andonegi -
Number of replies: 2

Hi!

I have read in the documentation about calling an image from a .css:

url([[pix:theme|gradient]]);

My question is: how shoul I load an image placed in an subfolder?

Thanks!

Average of ratings: -
In reply to José Miguel Andonegi

Re: Calling an image in a subfolder

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

In moodle 2 you have to add all your images into theme/yourtheme/pix folder but you can add your sub-directories too.

So if you have a sub-directory called images like so...

theme/yourthemename/pix/images

and you have a logo in this directory it will look like this...

theme/yourthemename/pix/images/logo.jpg

so you would need to write this in CSS like so...

url([[pix:theme|images/logo]]);

here is a link to a tutorial which explains it all

Themes 2.0 How to use images within your theme

Hope this helps?

Mary

Average of ratings: Useful (1)