Development talk:Themes 2.0 How to use images within your theme: Difference between revisions
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
body {background-image:url([[pix:theme|gradient.png]]);} | body {background-image:url([[pix:theme|gradient.png]]);} | ||
</code> | </code> | ||
--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.--[[User:Tim Hunt|Tim Hunt]] 18:50, 10 June 2010 (UTC) |
Revision as of 18:50, 10 June 2010
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)