drupal_is_front_page

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

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

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

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

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

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

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

blogapi_menu in modules/blogapi/blogapi.module
l in includes/common.inc
Оформляет ссылки.
menu_get_active_breadcrumb in includes/menu.inc
Получает хлебные крошки для текущей страницы, определенные активным путем.
phptemplate_page in themes/engines/phptemplate/phptemplate.engine
Prepare the values passed to the theme_page function to be passed into a pluggable template engine. Uses the arg() function to generate a series of page template files suggestions based on the current path. If none are found, the default page.tpl.php...
_menu_get_active_trail_in_submenu in includes/menu.inc
Find the active trail through a specific subsection of the menu tree.
_phptemplate_default_variables in themes/engines/phptemplate/phptemplate.engine
Adds additional helper variables to all templates.

Код

<?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'));
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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