menu_get_active_breadcrumb

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

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

Версии
5 – 6
menu_get_active_breadcrumb()

Получает хлебные крошки для текущей страницы, определенные активным путем.

Связанные темы

Код

<?php
function menu_get_active_breadcrumb() {

  // No breadcrumb for the front page.
  if (drupal_is_front_page()) {
    return array();
  }

  // We do *not* want to use "variable_get('site_frontpage', 'node)" here
  // as that will create the link '/node'. This is unsightly and creates
  // a second URL for the homepage ('/' *and* '/node').
  $links[] = l(t('Home'), '');

  $trail = _menu_get_active_trail();
  foreach ($trail as $mid) {
    $item = menu_get_item($mid);
    if ($item['type'] & MENU_VISIBLE_IN_BREADCRUMB) {
      $links[] = menu_item_link($mid);
    }
  }

  // The last item in the trail is the page title; don't display it here.
  array_pop($links);

  return $links;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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