Open link in a new window using the navigation_node class.

Open link in a new window using the navigation_node class.

by Lawrence Lagerlof -
Number of replies: 0

I have a question about creating links.

In my working code below I created a link that appear in the course menu (the gear icon).

$link = new moodle_url('/local/my_plugin/index.php', array('id' => $PAGE->course->id));
$item_menu = navigation_node::create(
'My destination',
$link,
navigation_node::NODETYPE_LEAF,
'my_plugin',
'my_plugin',
null
);
$item_menu->make_active();
$settingnode->add_node($item_menu);

This adds a link "My destination" to my menu, however I need to open it in a new window. It's possible?






Average of ratings: -