Clean Theme - Adding user menu to the mobile menu

Clean Theme - Adding user menu to the mobile menu

by Robert G -
Number of replies: 2

Hi, I've been working on a customized version of the "Clean" theme and was wondering if there is an easy way to have the "user menu" go into the "mobile menu" once a browser is resized to 767px? All off my custom menu items automatically move into this menu, but the user menu does not. Is this possible with css?

Clean theme - mobile menu

Thanks!

Average of ratings: -
In reply to Robert G

Re: Clean Theme - Adding user menu to the mobile menu

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Yes there is but would need a revamp of the way you display the user menu in the layout files.

All the code for the renderers that creat the way these things work can be found in moodle/lib/outputrenderers.php

The function you need is in this highlighted section of the master version. So check0out the relvant function for the moodle version you are intending your customised theme to be using.

https://github.com/lazydaisy/moodle/blob/master/lib/outputrenderers.php#L3183-L3377

Also if you know nothing about renderers and how to create them, then read this turorial about Overriding a renderer

Hope this helps?

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Clean Theme - Adding user menu to the mobile menu

by Robert G -

Thanks for the information Mary. I'll take a look!