Nested Navigation for Boost Theme Moodle 3.2

Re: Nested Navigation for Boost Theme Moodle 3.2

by Yuriy Hetmanskiy -
Number of replies: 0

Hi!

No,no! That was no asking for help, I've just remarked about the nuance of cache related to Navigation API! Don't forget about cache! 

So in general the code above is correct. And my code (file /loca/smart/lib.php) for instance was:

function local_smart_extend_navigation($navigation) {
$node = navigation_node::create(get_string('mycohorts', 'local_smart'),
new moodle_url('/blocks/cohortnews/cohorts.php', ['scope'=>'my']),
navigation_node::NODETYPE_LEAF,
'mycohorts',
'mycohorts',
new pix_icon('t/addcontact', 'my')
);
$node->showinflatnavigation = true;
$navigation->add_node($node); //....
Thanx!

Yurii