Best practice to modifying navigation drawer?

Best practice to modifying navigation drawer?

por Rex Lorenzo -
Número de respostas: 3

We are creating a new theme based off of the Boost theme and we want to customize the items that appear in the navigation drawer. My idea was to make a core edit to place where the flat_navigation class is created for the flatnav and replacing it with our own class:

https://github.com/moodle/moodle/blob/v3.4.1/lib/pagelib.php#L770

But is there a better approach to override the class file that produces the navigation drawer items so that we can rearrange them and add/remove items?

Or is there a theme that does this so that I can see what they do?

Média das avaliações:  -
Em resposta à Rex Lorenzo

Re: Best practice to modifying navigation drawer?

por Mary Evans -

I am not sure but this link may help understand the navigation ...

https://moodle.org/mod/forum/discuss.php?d=344068#p1391742

One theme that comes to mind is the Fordson theme.

Hope that helps?

Mary

Em resposta à Mary Evans

Re: Best practice to modifying navigation drawer?

por Rex Lorenzo -

Mary, thanks so much! The tool mentioned (https://github.com/moodleuulm/moodle-local_boostnavigation) does exactly what I need. I am going to take advantage of teh *_extend_navigation() hook. Very neat trick.

Em resposta à Rex Lorenzo

Re: Best practice to modifying navigation drawer?

por Mary Evans -

Oh...I had forgotten that link was there...good to hear that you found it useful!

Cheers

Mary