General developer forum

Is it possible to create Fordson child theme?

 
Picture of Sara Cenni
Is it possible to create Fordson child theme?
Core developersParticularly helpful Moodlers

Hi, I would like to create a Fordson child theme, because I need to use some different renderers.

I followed the instructions https://docs.moodle.org/dev/Creating_a_theme_based_on_boost so I created a new theme “Dummy” that extends Fordson adding this code in config.php

$THEME->parents = array(

     'boost',

     'fordson',

);

Then, in the lib.php, I rewrote these 3 functions and I copied in theme_dummy_get_main_scss_content the content of the fordson function.

function theme_dummy_get_pre_scss($theme) {

    $theme = theme_config::load('dummy');

    return theme_boost_get_pre_scss($theme);

}

function theme_dummy_get_extra_scss($theme) {

    $theme = theme_config::load('dummy');

    return theme_fordson_get_extra_scss($theme);

}

function theme_dummy_css_tree_post_processor($tree, $theme) {

    $prefixer = new theme_boost\autoprefixer($tree);

    $prefixer->prefix();

}

I also copied settings file and directory.

My theme isn’t working properly because some parts of pages look like boost page.


 

Is it possible to extend fordson theme or it easier to copy it and change the copied theme?

Thanks!


 
Average of ratings: -
C'est moi :-)
Re: Is it possible to create Fordson child theme?
Documentation writersParticularly helpful MoodlersTestersTranslators

Hi,

Just to indicate that the same question was asked in the theme forum, with answers.

Séverin

 
Average of ratings: -