Add A Dropdown Menu To Moodle

Re: Add A Dropdown Menu To Moodle

by Justin Hunt -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers

Well this does sound like something a theme plugin should do. 

 I think the best way would be to learn a little about overriding renderers in Moodle. Then you could find the renderer that is handling the location you want to customize. You would override that renderer and add your code to the output.

See here:

https://docs.moodle.org/dev/Overriding_a_renderer

The thing is that something has to call your renderer. If your renderer is part of the theme then its pretty straightforward. 

Otherwise you might make it part of a local plugin (not sure about that ..). 

I have overridden renderers without making a plugin or hacking anything come to think of it. I just wrote my renderer class and stuck it in the correct folder in the theme(e.g theme/boost/classes/output), so it would get picked up by class autoloading and applied.

If you post about this in the themes forum you might get a more knowledgable answer.