Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Theme settings.

Theme settings

From MoodleDocs
Revision as of 16:54, 7 November 2005 by Urs Hunkler (talk | contribs) (New: Theme settings)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 off theme selection - the session theme is set with the URL and lasts until you log out again. After a new login the site and/or user theme are active again. This option is great for theme testing and works perfectly when you want to enable a certain theme from a link.

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 could look like "http://mysite/moodle/course/view.php?id=18" without the session theme and "http://mysite/moodle/course/view.php?id=18&theme=orangewhitepda" with the pda theme set.

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