Decaf theme issue

Decaf theme issue

by scott braithwaite -
Number of replies: 4
I am using the decaf theme, we are in the process of testing upgrading from moodle 2.5.4 to moodle 2.8 however I have got a problem with the theme I cant seem to see what is causing it but I have had to add in the site admin to the branchtype switch
switch ($branchtype) {
            case self::TYPE_SITE_ADMIN:

but once this is done I have the full navigation showing in the top bar, however on all non admin pages this is just clickable rather than a drop down list, and on all the admin pages this is a drop down list.  I need to work out what is going on so that I can get the drop down menu back on all pages, and just wondering what might be causing this sort of behaviour, I have investigated the theme settings.php and config.php pages to check the layout options but can not see anything which could be causing the difference in behaviour here.

Any help would be greatly appreciated.

Thanks in advance ;)

Scott


Average of ratings: -
In reply to scott braithwaite

Re: Decaf theme issue

by Paul Nicholls -

Hi Scott,

If you upgrade to Decaf 2.0.5 (available in the Plugins database), you'll find a new Decaf setting ("Always populate site administration menu") which controls this behaviour.  In line with the Settings/Administration block, this setting is disabled by default for performance reasons; the Settings/Administration block loads it in via AJAX when you expand it, but that's not so straightforward in the Awesomebar as the menus expand when you hover rather than click - hence the new setting.  I haven't experienced any noticeable performance issues with the setting enabled.

You shouldn't need to make any changes to Decaf 2.0.5 in order for this to work - just change that setting, and you'll have the full Site Administration menu on all pages again.  Decaf 2.0.5 is also responsive (Bootstrap-based), so you should find that it works better on smaller screens / mobile devices too.


-Paul

In reply to Paul Nicholls

Re: Decaf theme issue

by scott braithwaite -
Hi Paul 


I looked at that option but noticed there was quite a few differences between how the new decaf theme works as this uses a column layout column one, two and three, also the renderers section has been split into a classes folder.


We have the front page and header and footer customised, students dont get to see the site admin menu whatsoever, and we have a custom layout rather than standard moodle on the front page, using this layout would I be able to still get away with a custom front page and how would I best utilise the 3 column layout which you have.


Thanks


Scott

In reply to scott braithwaite

Re: Decaf theme issue

by Paul Nicholls -

Hi Scott,

The theme config maps page layouts to layout files, so you can still use custom layouts by adding entries to the $THEME->layouts array in theme/decaf/config.php (preferably in a child theme, though, rather than modifying Decaf directly - that way you can keep Decaf up to date more easily).  With the renderers split out into separate files, it also means that child themes can override individual renderers more easily - the single combined renderers file made that a little difficult - so if you do need to override any to support your customisations, it should hopefully be a bit simpler with Decaf 2.


-Paul

In reply to Paul Nicholls

Re: Decaf theme issue

by scott braithwaite -

Thanks Paul

That makes alot of sense so I will move our code over to the new theme, and don't worry we cloned the decaf theme first so it is a child theme of your awesome decaf theme ;) it was just a few differences that had thrown me slightly as I did not want to compromise the theme whatsoever.


But will get this sorted now thanks for all the help.


Scott