Note: You are currently viewing documentation for Moodle 4.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Themes 2.0 How to use images within your theme.

Development talk:Themes 2.0 How to use images within your theme

From MoodleDocs
Revision as of 18:50, 10 June 2010 by Tim Hunt (talk | contribs)

Just had a quick browse through this, I have not tested this but are there file extensions missing in the examples?

e.g. - body {background-image:url(gradient);}

shouldn't this read - body {background-image:url(gradient.png);}

--Matthew Cannings

No. It is intentional.

It is not really important for theme images. After all, if you are making a theme, you probably do know what type your images are. However, suppose in your theme you want to override one of the standard icons, for example i/edit. Well, even though the standard images is i/edit.gif, you might want to replace it with i/edit.png in your theme, and you can, and Moodle will find the image as long as it is one of the supported formats. We use the same basic system for all images (theme, core and plugin) so that is why you must not specify the extension when you link to the image, and you can use any format you like.--Tim Hunt 18:50, 10 June 2010 (UTC)