menu_get_active_title

Definition

menu_get_active_title()
drupal/includes/menu.inc, line 1637

Description

Get the title of the current page, as determined by the active trail.

Related topics

Namesort iconDescription
Menu systemDefine the navigation menus, and route page requests to code based on URLs.

Code

function menu_get_active_title() {
  $active_trail = menu_get_active_trail();

  foreach (array_reverse($active_trail) as $item) {
    if (!(bool)($item['type'] & MENU_IS_LOCAL_TASK)) {
      return $item['title'];
    }
  }
}