_menu_get_active_trail

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/menu.inc, строка 942

Версии
5
_menu_get_active_trail()

Returns an array with the menu items that lead to the current menu item.

▾ 2 функции вызывают _menu_get_active_trail()

menu_get_active_breadcrumb in includes/menu.inc
Получает хлебные крошки для текущей страницы, определенные активным путем.
menu_in_active_trail in includes/menu.inc
Returns TRUE when the menu item is in the active trail.

Код

<?php
function _menu_get_active_trail() {
  static $trail;

  if (!isset($trail)) {
    $trail = array();

    $mid = menu_get_active_item();

    // Follow the parents up the chain to get the trail.
    while ($mid && ($item = menu_get_item($mid))) {
      array_unshift($trail, $mid);
      $mid = $item['pid'];
    }
  }
  return $trail;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему