Note:

This site is no longer used and is in read-only mode. Instead please go to our new Moodle Developer Resource site.

Upgrading themes to Moodle 3.6

From MoodleDocs
Revision as of 13:34, 14 July 2021 by David Mudrak (talk | contribs) (Text replacement - "<code php>" to "<syntaxhighlight lang="php">")

Moodle 3.2


Moodle 3.6 adds a few new features that effects child themes, the new messaging user interface requires a renderer callback to load the message drawer. This can affect boost and bootstrap base child themes.

Boost based child themes

If your child theme overrides one of these Boost layout files:

<syntaxhighlight lang="php"> templates/columns1.mustache templates/columns2.mustache

You will need to add this callback to your custom layout file:

<syntaxhighlight lang="php"> {{{ output.standard_after_main_region_html }}}

You custom layout file might define its own main content region, adding the renderer callback after this region should make it work:

<syntaxhighlight lang="php">

...

{{{ output.standard_after_main_region_html }}} If your theme defines its own layout files, make sure the callback is added there too. The callback should not be added to layout files for login, maintenance or the secure.mustache layout.

Bootstrapbase based child themes

If your child theme overrides one of these layout files:

<syntaxhighlight lang="php"> layout/columns1.php layout/columns2.php layout/columns3.php

You will need to add this callback to your custom layout file:

<syntaxhighlight lang="php"> <?php echo $OUTPUT->standard_after_main_region_html() ?>

You custom layout file might define its own main content region, adding the renderer callback after this region should make it work:

<syntaxhighlight lang="php">

...

<?php echo $OUTPUT->standard_after_main_region_html() ?>

If your theme defines its own layout files, make sure the callback is added there too. The callback should not be added to layout files for embedded, maintenance, popup or the secure.php layout.