function menu_tree_set_path


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 menu_tree_set_path($menu_name, $path = NULL)
cle7 menu_tree_set_path($menu_name, $path = NULL)
elmsmedia7 menu_tree_set_path($menu_name, $path = NULL)
icor7 menu_tree_set_path($menu_name, $path = NULL)
meedjum_blog7 menu_tree_set_path($menu_name, $path = NULL)
mooc7 menu_tree_set_path($menu_name, $path = NULL)

Sets the path for determining the active trail of the specified menu tree.

This path will also affect the breadcrumbs under some circumstances. Breadcrumbs are built using the preferred link returned by menu_link_get_preferred(). If the preferred link is inside one of the menus specified in calls to menu_tree_set_path(), the preferred link will be overridden by the corresponding path returned by menu_tree_get_path().

Setting this path does not affect the main content; for that use menu_set_active_item() instead.


$menu_name: The name of the affected menu tree.

$path: The path to use when finding the active trail.

Related topics

2 calls to menu_tree_set_path()
menu_test_menu_trail_callback in modules/simpletest/tests/menu_test.module
Callback that test menu_test_menu_tree_set_path().
menu_tree_get_path in includes/
Gets the path for determining the active trail of the specified menu tree.


includes/, line 1170
API for the Drupal menu system.


function menu_tree_set_path($menu_name, $path = NULL) {
  $paths = &drupal_static(__FUNCTION__);
  if (isset($path)) {
    $paths[$menu_name] = $path;
  return isset($paths[$menu_name]) ? $paths[$menu_name] : NULL;