Overwrite template / Create grandchildtheme without copying all settings

Overwrite template / Create grandchildtheme without copying all settings

by Alex M -
Number of replies: 3

We are using Moodle 3.11 and the Lambda theme.

We need to overwrite a single template and renderer.

Is the only way to accomplish this to create a child theme? We followed 

https://docs.moodle.org/dev/Creating_a_theme_based_on_boost and it says:

"This is the recommended way to extend boost as your child theme will not be affected by changes to the Boost settings, and both themes can be in use with different settings applied."

Lambda's settings.php has 1233 lines of code. Copying this would create a lot of duplication and create a lot of work always if we update Lambda.

Do we really have to copy all this settings or can we still use the configuration of our parent theme (Lambda) and maybe only add some own settings (if we even need those).

Or is there a way to inherit the settings?

Regards,
Alex

Average of ratings: -
In reply to Alex M

Re: Overwrite template / Create grandchildtheme without copying all settings

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
MDL-69982 may help to understand the core code in this regard.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Overwrite template / Create grandchildtheme without copying all settings

by Alex M -
I checked it, so it is not really possible to avoid copying all the settings?
In reply to Alex M

Re: Overwrite template / Create grandchildtheme without copying all settings

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Almost certainly, you just need to be sure you're dealing with a theme_config instance that relates to the theme with the settings and their values that you want to use.