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

ThemeDevelopment

From MoodleDocs
Revision as of 21:53, 24 August 2005 by Darren Smith (talk | contribs) (Links from original need doing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:

  • 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:

  1. Copy one of the existing theme folders to one with a new name. I recommend starting with one of the standard themes.
  2. Edit config.php and insert your own colours.
  3. Edit styles.php and change your CSS styles.
  4. 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