bratsun
7/12/2014 - 11:36 AM

Print all children of a menu item

Print all children of a menu item

function tmplt_childtree($mlid,$menu='main-menu') {
  $tree = menu_tree_all_data($menu);
  foreach($tree as $child){
    if($child['link']['mlid'] == $mlid){
      return drupal_render(menu_tree_output($child['below']));
    }
  }
}