Hi,
I have a local plugin and I am trying to add a link to the Site Home navigation menu.
So it becomes like My Courses
Something like:
Site Home
- My Media
Now in the other themes (Standard) it works fine, however in the new Boost Theme nothing is showing up.
This is the code:
function local_mymedia_extend_navigation($navigation) {The above code works for the standard theme, but not for the boost theme.
global $USER;
$node_home = $navigation->get('home');
$mymedia = get_string('nav_mymedia', 'local_mymedia');
$mymediaNode = $node_home->add($mymedia, new moodle_url('/local/mymedia/mymedia.php'), navigation_node::NODETYPE_LEAF, $mymedia, 'mymedia');
}
I tried some other things like adding:
$mymediaNode->set_parent($node_home);and nothing shows still.
$mymediaNode->indent = 1;
Also adding:
$mymediaNode->showinflatnavigation = true;will make the link show, however not under Site home, but as a link on its own.
Any help on how to add a child link under Site Home for same behaviour as My Courses?
Thanks