menu_in_active_trail_in_submenu

Versions
5
menu_in_active_trail_in_submenu($mid, $pid)

Returns TRUE when the menu item is in the active trail within a specific subsection of the menu tree.

Parameters

$mid The menu item being considered.

$pid The root of the subsection of the menu tree in which to look.

Related topics

▾ 1 function calls menu_in_active_trail_in_submenu()

menu_primary_links in drupal-5/includes/menu.inc
Returns an array containing the primary links. Can optionally descend from the root of the Primary links menu towards the current node for a specified number of levels and return that submenu. Used to generate a primary/secondary menu from different...

Code

drupal-5/includes/menu.inc, line 573

<?php
function menu_in_active_trail_in_submenu($mid, $pid) {
  $trail = _menu_get_active_trail_in_submenu($pid);

  if (!$trail) {
    return FALSE;
  }

  return in_array($mid, $trail);
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options