I'm trying to programmatically build a menu on my site, it works fine on all pages except a search view. This code I'm using is below:
$config = array('menu_name' => $menu_name, 'level' => 2, 'depth' => 10, 'expanded' => true);
$menu_tree = menu_tree_buildmenu_build_tree($config);
When I do a var_dump() of $menu_tree it has a content key in the array which has all the menu items, but only if the page is a 'normal' node. If it's the search results view then that array key is empty.
Does anyone have any idea why this is?
I also have two custom functions to change the output of the menu however these don't seem to be called as if I do a var_dump("test") at the start of them it has no affect. The two custom methods are:
THEME_menu_tree__menu_footer_links_1()
THEME_menu_link__menu_footer_links_1()