0

im trying to add a menu option to the secondary menu navigation bar that can be found on the course pages, i can't find any reference to secondary men or the menu names in the root directory can anyone point me in the right direction ?

secondary menu

secondary-menu2

Moodle: version 4.0.1 theme : boost

p.s is there some sort of developer documentation to find where all these mustache file link to so its easier to find files

1 Answers1

0

From the documentation:

Any plugin implementing the following callback in lib.php can extend the course settings navigation.

function <component>_extend_navigation_course(navigation_node $parentnode, stdClass $course, context_course $context) 

For example, for a plugin called local_example:

function local_example_extend_navigation_course(navigation_node $parentnode, stdClass $course, context_course $context) {
    $parentnode->add(
        "Display text",
        new moodle_url('/index.php'),
        navigation_node::TYPE_SETTING,
        null,
        "local_example_item",
        new pix_icon('i/courseevent', '')
    );

By default in the Boost theme for Moodle 4.0+, this will add a new item to the "More" overflow menu. You'll have to customise the theme if you want to change this behaviour

Neirid
  • 363
  • 2
  • 8