-

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

Theme directory: Difference between revisions

From MoodleDocs
No edit summary
m (Removed Moodle 2.0 indicator)
 
(22 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Themes}}
{{Themes}}In the standard Moodle distribution, all themes are placed in the theme/ directory.


In the standard Moodle distribution, all themes are placed in the theme/ directory.
More information about the content of a typical theme directory/folder can be found in [[:dev:Theme_basics#What_is_inside_a_theme_folder.3F|Theme basics]]


Moodle is flexible and starting with 1.7, moodle will fully support changing the location of the theme directory.
== Change themes default directory for site ==


== Changing theme Location ==
The storage location of themes may be altered, using the variable ''$CFG->themedir''. Themes from placed in the directory specified by this variable will then be available for selection using the theme selector.


Starting from Moodle 1.7, the location of themes may be altered, using the variables ''$CFG->themewww'' and ''$CFG->themedir'' - themes from placed in the specified directory will be able to be selected using the theme selector.
For example, should you wish to place themes in a subdirectory called 'my_moodle_themes', your 'config.php' file might look like this:
<pre>
$CFG->wwwroot  = 'http://my.moodle.site.edu';
$CFG->dirroot  = '/var/www/my.moodle.site.edu/public_html';
$CFG->themedir = $CFG->dirroot . '/my_moodle_themes';
</pre>
 
or any place that you have configured to be readable by your web server, for example:


For example, should you wish to place themes in a subdirectory called 'my_moodle_themes', your config.php might look like this:
<pre>
<pre>
$CFG->wwwroot  = 'http://my.moodle.site.edu';
$CFG->wwwroot  = 'http://my.moodle.site.edu';
$CFG->dirroot  = '/var/www/my.moodle.site.edu/public_html';
$CFG->dirroot  = '/var/www/my.moodle.site.edu/public_html';
$CFG->themewww = $CFG->wwwroot . '/my_moodle_themes';
$CFG->themedir = '/home/me/my_moodle_themes';
$CFG->themedir  = $CFG->dirroot . '/my_moodle_themes';
</pre>
</pre>


== Theme directory for Developers ==
== Theme directory for Developers ==


Developers should follow the [[Development:Theme directory guide]]
Developers should follow the [[:dev:Theme directory guide|Theme directory guide]]


== See Also ==
== See also ==


*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=20152 Feature request: Themes path in a VAR]
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=20152 Feature request: Themes path in a VAR]
Line 27: Line 32:


[[Category:Administrator]]
[[Category:Administrator]]
[[Category:Themes]]
[[fr:Dossier de thèmes]]
[[ja:テーマディレクトリ]]
[[de:Design-Verzeichnis]]

Latest revision as of 17:48, 8 February 2019

In the standard Moodle distribution, all themes are placed in the theme/ directory.

More information about the content of a typical theme directory/folder can be found in Theme basics

Change themes default directory for site

The storage location of themes may be altered, using the variable $CFG->themedir. Themes from placed in the directory specified by this variable will then be available for selection using the theme selector.

For example, should you wish to place themes in a subdirectory called 'my_moodle_themes', your 'config.php' file might look like this:

$CFG->wwwroot   = 'http://my.moodle.site.edu';
$CFG->dirroot   = '/var/www/my.moodle.site.edu/public_html';
$CFG->themedir  = $CFG->dirroot . '/my_moodle_themes';

or any place that you have configured to be readable by your web server, for example:

$CFG->wwwroot   = 'http://my.moodle.site.edu';
$CFG->dirroot   = '/var/www/my.moodle.site.edu/public_html';
$CFG->themedir  = '/home/me/my_moodle_themes';

Theme directory for Developers

Developers should follow the Theme directory guide

See also