Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: ThemeDevelopment.

ThemeDevelopment: Difference between revisions

From MoodleDocs
(Links from original need doing)
 
mNo edit summary
Line 1: Line 1:
Themes (or skins) define the look of a site. A number of simple themes are provided in the main distribution, but you may want to create your own theme with your own colours, logo, styles and graphics.
Themes (or skins) define the look of a site. A number of simple themes are provided in the main distribution, but you may want to create your own theme with your own colours, logo, styles and graphics.


Each theme is in a subdirectory of the "theme" directory, and contains at least the following files:
#REDIRECT [[Themes]]
 
* '''config.php''': defines the theme colours used throughout the site
* '''styles.php''': the style sheet, containing CSS definitions for standard HTML elements as well as many Moodle elements.
* '''header.html''': Included at the top of each page. This is what you need to edit to add a logo at the top of pages, for example.
* '''footer.html''': Included at the bottom of each page.
 
To create your own themes for current versions of Moodle:
 
# Copy one of the existing theme folders to one with a new name. I recommend starting with one of the standard themes.
# Edit config.php and insert your own colours.
# Edit styles.php and change your CSS styles.
# Edit header.html and footer.html to add new logos, or change the layout.
 
Note that all these steps are optional - you can make a radically different look to your site simply by editing the colours in config.php
 
Note also that Moodle upgrades may break themes slightly, so check the release notes carefully if you are using a custom theme.
 
In particular, Moodle 2.0 will have a completely new display system, probably based on XSL transformations of XML output from Moodle. It is likely that the themes for this will be a completely different format, but the advantage will be a much higher possible degree of customisation (including moving elements around the page).
 
More discussion about this in the Themes forum on Using Moodle. If you create a nice theme that you think others might want to use, please post your zip file on the themes forum!
'''Bold text'''

Revision as of 09:56, 25 August 2005

Themes (or skins) define the look of a site. A number of simple themes are provided in the main distribution, but you may want to create your own theme with your own colours, logo, styles and graphics.

  1. REDIRECT Themes