Essential Theme Menu

Essential Theme Menu

by Ro Ro -
Number of replies: 4

Hi, 

I'm using the Essential Theme, and would like to move the "turn on/off editing" button to the top navigation sticky menu, so it will always be available and wouldn't have to scroll to find it. 

How would I be able to do this? 
I'm a bit new to moodle and have very basic coding knowledge. 


Thanks!

Average of ratings: -
In reply to Ro Ro

Re: Essential Theme Menu

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

The code you need is here...

https://github.com/gjb2048/moodle-theme_essential/blob/master/layout/columns1.php#L34-L35

which you can remove from all the layout files in Essential that carries it.

Then add it like this ...

<div class="breadcrumb-button pull-right"><?php echo $OUTPUT->page_heading_button(); ?></div>

just above the message menu  here...

https://github.com/gjb2048/moodle-theme_essential/blob/master/layout/includes/header.php#L138

I can't guarantee it will work though, as I have a feeling its usage is different depending on the page you are on.

In reply to Mary Evans

Re: Essential Theme Menu

by Ro Ro -

Thank you! That is very close to what I was hoping for! 

What I really need it for is when viewing the main page of a moodle course, to be able to turn the editing on and off, without having to scroll up and down to find the button. 

The problem is, that now even that the button is in the top menu, when you click on it, it refreshes the page and goes back up to the top of the page.. would there be a way to stay at the same place on the page and just turn the editing on/off?


Thanks again for being so helpful!

In reply to Ro Ro

Re: Essential Theme Menu

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

Probably...you could suggest it Gareth and he may add it as a new feature if you were prepared to fund the work to do that?

Cheers

Mary

In reply to Ro Ro

Re: Essential Theme Menu

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

Page refresh is a factor in the way this functionality works and applies to all themes.  I don't know if its possible to add a bookmark parameter to that url and then scroll automatically to a given point when the refresh happens.