Child theme doesn't work

Issue #275 new
Clement p created an issue

Hi,

I try to create a child theme to test some modifications on the theme. Child theme seems do not working well : breadcrumb don't display well, impossible to click on administration's menu/submenu, courses on home page are not align, etc. Do you think is it possible to create a child theme ?

In my case I : 1. Create a folder named "adaptablechild" 2. Create a "config.php" file and change "$THEME->name" "$THEME->parents" + "$THEME->sheets" 3. Create "lang" folder and change files name with "theme_adaptablechild.php". 4. Create a "version.php" file and modify "$plugin->component ".

Do you think we need to do other modification to create child theme ?

Best regards.

Comments (4)

  1. Clement p reporter

    Hi,

    In fact, I think jquery files are not loading in the child theme. I continue to look that soon.

    ++

  2. Clement p reporter

    Hi,

    I imagine we need to create a lib.php files too. I tried with

    /**
     * Initialize page
     * @param moodle_page $page
     */
    function theme_adaptablechild_page_init(moodle_page $page) {
        global $CFG;
        $page->requires->jquery();
        // REMOVED: Deprecated function    error_log($CFG->version); ???
        if ($CFG->version < 2015051100) {
            $page->requires->jquery_plugin('bootstrap', 'theme_adaptable');
            $page->requires->jquery_plugin('dropdown', 'theme_adaptable');
        }
    
        $page->requires->jquery_plugin('pace', 'theme_adaptable');
        $page->requires->jquery_plugin('flexslider', 'theme_adaptable');
        $page->requires->jquery_plugin('ticker', 'theme_adaptable');
        $page->requires->jquery_plugin('easing', 'theme_adaptable');
        $page->requires->jquery_plugin('adaptable', 'theme_adaptable');
    }
    

    It seems better. But in my case, contents bottom header in homepage doesn't display now.

    ++

  3. Tristan daCosta

    Like Clement, I can't seem to make a child theme work correctly.

    No jQuery libraries loading, stylesheets not loading correctly.

  4. Paulus Fitzek

    I can't get it work either. We would like to use Moodle with cohort themes enabled and multiple clones or childs of adaptable theme installed and just slightly modified for each logged in institution.

  5. Log in to comment