You are here

function _menutrails_recurse in Menu TrailsMenu Trails 6

Recursion to find the top tree.

File

./menutrails.module, line 403
Menutrails allows the assignment of "trails" which will keep menu items active for individual node views.

Code

function _menutrails_recurse($tree, $href) {
  foreach ($tree as $link) {
    if ($link['link']['link_path'] == $href) {
      $found = $link;
      break;
    }
    if (is_array($link['below'])) {
      $found = _menutrails_recurse($link['below'], $href);
    }
  }
  return $found;
}