Allow theme change by URL: Difference between revisions

From MoodleDocs
No edit summary
Line 12: Line 12:
<pre>http://localhost/moodle30/course/view.php?id=3&theme=essential</pre>
<pre>http://localhost/moodle30/course/view.php?id=3&theme=essential</pre>
will change theme to Essential after clicking the Enter tab on your keyboard.
will change theme to Essential after clicking the Enter tab on your keyboard.
* It is important to note that Session level themes (those set with the URL parameter theme=theme_name), override the Site level theme ONLY for the user's current logged in session. When the user logs out, they will then see the Default site theme, not the Session theme.
* You only have to set the theme once via the URL parameter and it will persist until the user logs out.


[[es:Permitir cambio de tema por URL]]
[[es:Permitir cambio de tema por URL]]
[[fr:Autoriser le changement de thème par URL]]
[[fr:Autoriser le changement de thème par URL]]

Revision as of 18:39, 4 August 2021

Site Administration > Appearance > Themes > Theme settings

Enabling this setting in Moodle 2.0+ themes allows you to change theme by adding either ?theme= or &theme= (followed by the theme name you wish to change to) depending on where you are at the time you want to swap to another theme.

For Example: If you are at the front page of your site that add ?theme=

http://localhost/moodle30/?theme=essential

after clicking the Enter tab on your keyboard. this will change from your present theme to the Essential theme layout, providing or course that you have that theme installed in your Moodle site.

Alternatively if you are in a course page then add &theme=

http://localhost/moodle30/course/view.php?id=3&theme=essential

will change theme to Essential after clicking the Enter tab on your keyboard.


  • It is important to note that Session level themes (those set with the URL parameter theme=theme_name), override the Site level theme ONLY for the user's current logged in session. When the user logs out, they will then see the Default site theme, not the Session theme.
  • You only have to set the theme once via the URL parameter and it will persist until the user logs out.