Hi,
with the great support of this forum I managed to build a nice child AND a child-child theme for moodle 3.4.
The main reason is, the child theme gets all the locallib stuff (not done by me) and the child-dhild themes just make some small color changes.
It uses boost from 3.4 and just has changes in it where needed. It loads template and SCSS from boost first and than adds all other stuff.
I have troubles to convert it to moodle 3.5 within the following points:
- SCSS loading (and working - some changes seems not to be working (even within the same file!?)
- templates not loading (code parts added are just not there, wrong references to main theme?)
I digged around for weeks, read I guess all the topics from Mary, Richard, ... all links in the moodle docs (https://docs.moodle.org/dev/Updating_a_boost_based_theme), but it seems that most child themes for moodle 3.5 copy boost into their theme!? Which is not the way I would like to do, to prevent sticking with old files on updates.
I do not mind the changes in classes and that stuff (I think I understand that part )
This is my moodle 3.4 lib.php (just the main parts)
function theme_moodle_child-child_get_main_scss_content($theme) {
global $CFG;
$scss = '';
$filename = !empty($theme->settings->preset) ? $theme->settings->preset : null;
$fs = get_file_storage();
$context = context_system::instance();
$scss .= file_get_contents($CFG->dirroot . '/theme/childtheme/scss/preset/default.scss');
$scss .= file_get_contents($CFG->dirroot . '/theme/child-childtheme/scss/preset/default.scss');
$scss .= file_get_contents($CFG->dirroot . '/theme/childtheme/scss/preset/layout.scss');
$scss .= file_get_contents($CFG->dirroot . '/theme/child-childtheme/scss/preset/layout.scss');
$scss .= file_get_contents($CFG->dirroot . '/theme/child-childtheme/scss/preset/post.scss');
return $scss;
}
How would this look like for moodle 3.5 and the new boost?
best regards!
Antonio