How to add a block to the main menu block

How to add a block to the main menu block

by Svenja Lell -
Number of replies: 1

Hi,


We use Moodle 3.5 with Boost theme. For a special navigation I'd like to add a block to the main menu block on the left hand side. I'd like to put it above the menu drawer .

Can you get me started how to do that ? docu ?


Thx a lot


Kind Regards,

Svenja


Average of ratings: -
In reply to Svenja Lell

Re: How to add a block to the main menu block

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

It can be done but it is not trivial.  In essence you need to add a new block region and override the 'flat navigation' template and the code that supplies the context to add it.  So there is https://moodle.org/mod/forum/discuss.php?d=231020 for adding a new block region to the code but that doesn't take into account templates which were not around at the time.  So you'll also need to understand templates: https://docs.moodle.org/dev/Templates. ; Its also worth reading and understanding: https://docs.moodle.org/dev/Themes_overview.