Essential theme hiding Header block and top page from users

Essential theme hiding Header block and top page from users

Yvonne Hamilton發表於
Number of replies: 8

Hi,

We use essential theme and have upgraded to Essential 3.1.1.4 with Moodle 3.1.3+

Some of the new features aren't something we want so would like to remove the functionality if poss.

I have added this code below into CSS to hide the regions from course pages etc........

/* Hide Top page block*/
aside#block-region-page-top {
display: none;} 

/* Hide Header block*/
aside#block-region-header {
display: none;}

....I would also like to remove these as region options when editing the Blocks "On this page" and "Where this block appears" as teachers can send blocks into the unknown with these edit block options still available for selection.

Is this possible and simple.....maybe??

Regards,

Yvonne

評比平均分數: -
In reply to Yvonne Hamilton

Re: Essential theme hiding Header block and top page from users

Gareth J Barnard發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片

Possible = yes.  Simple = depends on how comfortable you are with changing PHP and what the solution transpires to be.

In reply to Gareth J Barnard

Re: Essential theme hiding Header block and top page from users

Yvonne Hamilton發表於

Hi Gareth,

I am happy to change php I just don't know what code to change and in which file(s) to change it. Any advice?

Regards,

Yvonne

In reply to Yvonne Hamilton

Re: Essential theme hiding Header block and top page from users

Gareth J Barnard發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片

Hi Yvonne,

Look in config.php.  There will be other files to change.

Beyond that I'd be working out the solution and time is money.

Kind regards,

Gareth

In reply to Gareth J Barnard

Re: Essential theme hiding Header block and top page from users

Yvonne Hamilton發表於

Thanks anyway,

I just wish the ones who paid for this "feature" to go into the theme also paid for the functionality to be enabled and disabled.

Regards,

Yvonne


In reply to Yvonne Hamilton

Re: Essential theme hiding Header block and top page from users

Mary Evans發表於

Well...perhaps if we ask Gareth nicely he may do exactly that, as he perhaps never realised that not every one wants these settings? Besides most of Moodle settings have a Yes/No setting.Yes by default No by design or visa-versa.

After all it is Christmas!

Mary

In reply to Mary Evans

Re: Essential theme hiding Header block and top page from users

Yvonne Hamilton發表於

Hi Mary,

I was thinking maybe I could change the text colour that displays for Page top, Header, Left, Right to #ffffff so the words don't display so at least it looks cleaner. I think our staff would be less likely to attempt to use these regions if they weren't so obvious (when empty). I would only want the colour of these sections to be white on course pages....is that something you would know how to do and could help with?

Regards,

Yvonne

In reply to Yvonne Hamilton

Re: Essential theme hiding Header block and top page from users

Mary Evans發表於

Well you could try removing said block regions from the Essential themes layout/frontpage.php

https://github.com/gjb2048/moodle-theme_essential/blob/master/layout/frontpage.php#L41-L43

https://github.com/gjb2048/moodle-theme_essential/blob/master/layout/frontpage.php#L197-L208

as well as references to same in essential/config.php

https://github.com/gjb2048/moodle-theme_essential/blob/master/config.php#L64-L74

https://github.com/gjb2048/moodle-theme_essential/blob/master/config.php#L88

That would remove the blocks as well as the names of those regions when editing.

Just make you you make a copy of the frontpage.php and config.php files before you alter it.

Mary