function menu_set_active_item

Sets the active path, which determines which page is loaded.

Note that this may not have the desired effect unless invoked very early in the page load or unless you do a subrequest to generate your page output.

Parameters

$path: A Drupal path - not a path alias.

Related topics

File

drupal/core/includes/menu.inc, line 2364
API for the Drupal menu system.

Code

function menu_set_active_item($path) {

  // Since the active item has changed, the active menu trail may also be out
  // of date.
  drupal_static_reset('menu_set_active_trail');

  // @todo Refactor to use the Symfony Request object.
  _current_path($path);
}