menu_set_active_item

  1. drupal
    1. 4.7 menu.inc
    2. 5 menu.inc
    3. 6
    4. 7
Versions
4.7 – 5 menu_set_active_item($path = NULL)
6 – 7 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 functions call menu_set_active_item()

drupal_deliver_html_page in drupal/includes/common.inc
Package and send the result of a page callback to the browser as HTML.
user_page in drupal/modules/user/user.pages.inc
Access callback for path /user.

Code

drupal/includes/menu.inc, line 2237

<?php
function menu_set_active_item($path) {
  $_GET['q'] = $path;
}
?>