function sws_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { if ($op == 'view' && $page) { switch ($node->type) { case 'disknode': $menu = menu_get_menu(); $mid = $menu['path index']['community/downloads']; $location = array(); while ($mid && ($item = menu_get_item($mid))) { array_unshift($location, $item); $mid = $item['pid']; } $location[] = array('path' => $_GET['q']); dprint_r($location); menu_set_location($location); } } }