Skip navigation
Help

menu_set_active_item

6 menu.inc menu_set_active_item($path)
7 menu.inc menu_set_active_item($path)

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

Parameters

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

Note that this may not have the desired effect unless invoked very early in the page load, such as during hook_boot, or unless you call menu_execute_active_handler() to generate your page output.

Related topics

2 calls to menu_set_active_item()

File

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

Code

function menu_set_active_item($path) {
  $_GET['q'] = $path;
}