menu_set_active_item
Definition
menu_set_active_item($path)
includes/menu.inc, line 1480
Description
Set 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, such as during hook_boot, or unless you call menu_execute_active_handler() to generate your page output.
Parameters
$path A Drupal path - not a path alias.
Related topics
| Name | Description |
|---|---|
| Menu system | Define the navigation menus, and route page requests to code based on URLs. |
Code
<?php
function menu_set_active_item($path) {
$_GET['q'] = $path;
}
?> 