Creating a new theme

Creating a new theme

by Yves Savard -
Number of replies: 2

When we create a new theme, can we override any file of any directory of the code of Moodle inside that new theme?

By exemple, can we override /admin/settings/top.php by replicating /admin/settings/top.php in the directory of that new theme?

Average of ratings: -
In reply to Yves Savard

Re: Creating a new theme

by David Scotson -
The short answer is no.

There's things called renderers, you can override anything that uses those by creating a replacement version and editing it but it doesn't work on a file-by-file basis and it's not used everywhere.
In reply to Yves Savard

Re: Creating a new theme

by Jason Hardin -

What David said. I highly recommend reading http://docs.moodle.org/dev/Overriding_a_renderer.

Moodle doesn't have renderers for everything and it will depend on which version of Moodle you are working on your theme for. 2.5 has added a lot of renderers for the course that didn't exist before. Slowly but surely the theme is able to control more and more of the interface.

3rd party plugins will also be hit or miss. In 2.5 you have extensive control over all of the pages of the course. The other thing to look at is layout files. See http://docs.moodle.org/dev/Creating_a_theme for more information. The documentation on themes is very solid.

Average of ratings:Useful (1)