Hi, I am using Moodle 2.5.1 with Essential theme and have enabled custom menus for the front page..
I'd like to know it it is possible to retain the same theme for user homepages but with custom menus disabled
Hi, I am using Moodle 2.5.1 with Essential theme and have enabled custom menus for the front page..
I'd like to know it it is possible to retain the same theme for user homepages but with custom menus disabled
Yes you can. Using Notepad , all you need to do is add the following option for My dashboard and My public...found under $THEME->layouts = array(... ...); in essential/config.php...
// My dashboard page.
'mydashboard' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post', 'footer-left', 'footer-middle', 'footer-right'),
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true), 'nocustommenu'=>true,
),
// My public page.
'mypublic' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post', 'footer-left', 'footer-middle', 'footer-right'),
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true), 'nocustommenu'=>true,
),
Hope this helps?
Mary
Cool - that does help, thank you Mary.
I'll stretch my luck and take it one step further - again using the same theme throughout with custom menus enabled, is it possible to have a different menu item (or more) in the user homepage to what's in the site frontpage. For example, my client is asking if we could put "My Courses" on the user frontpage custom menu (but not the site front page).
Yes, I would think that would be possible, if you made a separate layout file, that could be coded to use the MyCourses renderer. Something like mydashboard.php
// My dashboard page.
'mydashboard' => array(
'file' => 'mydashboard.php',
'regions' => array('side-pre', 'side-post', 'footer-left', 'footer-middle', 'footer-right'),
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true), 'nocustommenu'=>false,
),
And use the setting for the custom menu as described in MDL-31043
That allows you to also set a specific menu from within the theme's custom setting page.
For an idea how to add it look at the Aaradyha theme code.
Cheers
Mary
Hi again Mary,
I tried to do something related but a little different. I configured Moodle to force user logins and for the home page to be My Moodle. I have set up my custom menus so that they appear on the homepage and elsewhere.
The login page is now this page show in attachment loginpage.jpg (it used to say "Returning to this site?".
I assumed, in the Essential config.php that I should have made this change:
under $THEME->layouts = array(... ...); |
I purged all caches and theme cache, clobbered browser history and cache but still the custom menu appears on this Public Login page.
Any suggestions?
Hi Mary,
related to the above I'm trying to change the 'visited' colour on the custommenu bar. I can't find where this is set and I've tried playing around with #custommenu ..... in the Custom CSS in the essential general settings, but only the visited links in the header and breadcrumbs change, never the custommenu items.
Hi Mary,
It was not what you said that made me cautious about upgrading Essential to v2.5.4, more the volume of posts. While I have a reasonable handle on PHP I'm no expert and so need to tread carefully.
However, in view of your last advice I have installed v2.5.4 and, yes, it has some great and handy new features, some of which I will use.
Unfortunately it does not help with my need to turn off the custommenu on the Public Login Page. While Essential now provides more flexibility with the Front Page, I have disabled it as it adds no value to what my clients require. Our students will login via a button from an external website which means the first Moodle page they see is the Public Login Page ("Returning to this Site?").
I tried your suggestion of adding 'nocustommenu'=>true, to the Public Login Page section of config.php but this had no effect. (Note that this also did not have any effect when I tried adding it to My dashboard page and My public page.) I did purge the theme cache and also purged all cache, and likewise purged my browser (Firefox), all to no avail.
Is there something else I can do to remove the custommenu from the Public Login Page (only)?
I found a solution to this.
In the file themes/essential/layout/login.php I commented out the line
<?php echo $OUTPUT->custom_menu(); ?>
This has done the trick. My custommenu does not appear on the Public Login Page and it does everywhere else.
Thank you Mary for your patience and advice. You pointed me in the right direction and I eventually got there.
I like to point out the obvious that updates to the theme include numerous bugfixes. Lots of the comments around essential are for older versions that are fixed. So far the issues reported with 2.5.4 have all been related to issues outside the theme. I would recommend the upgrade.
Julian