function menu_views_menu_link_alter in Menu Views 8.3
Same name and namespace in other branches
- 7.2 menu_views.module \menu_views_menu_link_alter()
File
- ./
menu_views.module, line 388 - Module to allow Views to be attached as menu items.
Code
function menu_views_menu_link_alter(&$link) {
$item = _menu_views_get_item($link);
if ($item['type'] == 'view') {
if (isset($link['link_path']) && $link['link_path'] != '<view>') {
$item['original_path'] = $link['link_path'];
}
$link['link_path'] = '<view>';
$link['options']['alter'] = TRUE;
}
}