Remove items from navigation block?

Re: Remove items from navigation block?

by Doyle Lewis -
Number of replies: 0

Yep, that works, but the method to call is just add(). Here is some similar code I have to add a link to the main course menu.

$coursenode = $PAGE->navigation->find($COURSE->id, navigation_node::TYPE_COURSE);
if ($coursenode) {
$coursenode->add('Build LTI Cartridge', new moodle_url('/course/builder.php', ['id'=> $COURSE->id]), navigation_node::TYPE_CUSTOM, null , null, new pix_icon('a/download_all' , ''));
}