drupal_is_front_page

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

includes/path.inc, строка 218

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

Проверяет, является ли текущая страница главной.

Возвращаемое значение

Если текущая страница главная — TRUE, иначе — FALSE.

▾ 9 функции вызывают drupal_is_front_page()

blogapi_init in modules/blogapi/blogapi.module
l in includes/common.inc
Оформляет ссылки.
locale_block in modules/locale/locale.module
Реализация hook_block(). Отображает переключатель языков. Ссылки могут быть предоставлены другими модулями.
menu_get_active_breadcrumb in includes/menu.inc
Получает хлебные крошки для текущей страницы, определенные активным путем.
menu_set_active_trail in includes/menu.inc
Задает (или получает) активный след текущей страницы - путь к корню в дереве меню.
menu_tree_page_data in includes/menu.inc
Get the data structure representing a named menu tree, based on the current page.
template_preprocess in includes/theme.inc
Adds a default set of helper variables for preprocess functions and templates. This comes in before any other preprocess function which makes it possible to be used in default theme implementations (non-overriden theme functions).
template_preprocess_page in includes/theme.inc
Обрабатывает переменные для page.tpl.php
theme_links in includes/theme.inc
Возвращает темизированный набор ссылок.

Код

<?php
function drupal_is_front_page() {
  // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path,
  // we can check it against the 'site_frontpage' variable.
  return $_GET['q'] == drupal_get_normal_path(variable_get('site_frontpage', 'node'));
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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