Different Custom Menus for Categories

Re: Different Custom Menus for Categories

by Flávio Camargo -
Number of replies: 0

Staff have good news!

For the Moodle version 2.4 is not necessary to change the file 'outputrenderers.php'. you change only two files that are inside your settings.php and the default.php template (located in the folder layout).

Add the settings.php file of your template information:

$ name = 'theme_afterburner / custommenuitems';
$ title = get_string ('custommenuitems', 'admin');
$ description = get_string ('configcustommenuitems', 'admin');
$ default ='';
$ setting = new admin_setting_configtextarea ($ name, $ title, $ description, $ default);
$ settings-> add ($ setting);

* In this example I changed the theme afterburner then according to your template change the name.

Then in your theme file theme / layout / default.php find this line:
OUTPUT = $ $ custommenu-> custom_menu ();
and replace it with this:
$ custommenu = $ OUTPUT-> custom_menu ($ PAGE-> theme-> settings-> custommenuitems);

Ready then just run to hug!! =)