Note: You are currently viewing documentation for Moodle 3.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Theme settings.

Theme settings

From MoodleDocs
Revision as of 23:07, 19 November 2005 by Helen Foster and Bella (talk | contribs) (admin documentation category)

Theme Types and Settings

The Theme Settings on the Variables Page

On the admin page "MyMoodle » Administration » Configuration » Variables" you set the options to allow user and/or course specific themes:

themelist: Leave this blank to allow any valid theme to be used. If you want to shorten the theme menu, you can specify a comma-separated list of names here (Don't use spaces!). For example: standard,orangewhite.

allowuserthemes: If you enable this, then users will be allowed to set their own themes. User themes override site themes (but not course themes)

allowcoursethemes: If you enable this, then courses will be allowed to set their own themes. Course themes override all other theme choices (site, user, or session themes)

The Theme Types

Site Themes

On the admin page "MyMoodle » Administration » Configuration » Themes" you choose the basic theme for your Moodle site. Theme previews give you a first impression how the theme looks.

User Themes

If the option allowuserthemes: is enabled every user can select her own theme. On the page "MyMoodle » User  » Edit profile" go to the option Preferred theme and select your theme from the theme list specified by the administrator (see above). All Moodle pages will be displayed in the users theme.

Course Themes

If the option allowcoursethemes: is enabled every editing teacher can select the theme for the active course. On the page "MyMoodle » mycourse » Edit course settings" go to the option Force theme: and select your theme from the theme list specified by the administrator (see above). The course page will be displayed with this selected theme, all other Moodle pages will be displayed with different themes. The course will always been displayed in the theme specified in the course setting, user themes and the site theme are overwritten.

Session Themes

Moodle offers an additional way to set a theme - the session theme is set with the URL and lasts until you log out. After a new login the site and/or user theme is active again. This option is great for theme testing and works perfectly when you want to enable different themes for different situations.

For example you can offer a special link for PDA users and integrate the session theme "orangewhitepda" in that link. Nobody needs to change any settings, you just click on that link. The session theme is called by the url parameter "&theme=orangewhitepda" - the whole url without the session theme could look like "http://mysite/moodle/course/view.php?id=18" and with the parameter for the pda theme like "http://mysite/moodle/course/view.php?id=18&theme=orangewhitepda".

In a standard Moodle installation session themes are not active. To activate them the administrator must add the parameter "$CFG->allowthemechangeonurl = true;" to the Moodle config.php file in the Moodle base directory.

Theme Type Overview

Theme Type Overwrites Display Setting Type
Site Theme - all pages* saved in theme profile
User Theme Site Theme all pages* saved in user profile
Course Theme Site theme,

User Theme,
Session Theme

one course saved in course profile
Session Theme Site Theme,

User Theme

all pages* temporary until logout

(* all pages except courses with the Course Theme set.)