Overwrite template / Create grandchildtheme without copying all settings

Overwrite template / Create grandchildtheme without copying all settings

von Alex M -
Anzahl Antworten: 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

Als Antwort auf Alex M

Re: Overwrite template / Create grandchildtheme without copying all settings

von Gareth J Barnard -
Nutzerbild von Core developers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers
MDL-69982 may help to understand the core code in this regard.
Als Antwort auf Gareth J Barnard

Re: Overwrite template / Create grandchildtheme without copying all settings

von Alex M -
I checked it, so it is not really possible to avoid copying all the settings?
Als Antwort auf Alex M

Re: Overwrite template / Create grandchildtheme without copying all settings

von Gareth J Barnard -
Nutzerbild von Core developers Nutzerbild von Particularly helpful Moodlers Nutzerbild von 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.