drupal_is_front_page

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 drupal_is_front_page()

Check if the current page is the front page.

Rückgabewert

Boolean value: TRUE if the current page is the front page; FALSE if otherwise.

▾ 9 functions call drupal_is_front_page()

blogapi_init in modules/blogapi/blogapi.module
l in includes/common.inc
Formats an internal or external URL link as an HTML anchor tag.
locale_block in modules/locale/locale.module
Implementation of hook_block(). Displays a language switcher. Translation links may be provided by other modules.
menu_get_active_breadcrumb in includes/menu.inc
Get the breadcrumb for the current page, as determined by the active trail.
menu_set_active_trail in includes/menu.inc
Sets or gets the active trail (path to root menu root) of the current page.
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
Process variables for page.tpl.php
theme_links in includes/theme.inc
Return a themed set of links.

Code

includes/path.inc, line 222

<?php
function drupal_is_front_page() {
  static $is_front_page;

  if (!isset($is_front_page)) {
    // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path,
    // we can check it against the 'site_frontpage' variable.
    $is_front_page = ($_GET['q'] == drupal_get_normal_path(variable_get('site_frontpage', 'node')));
  }

  return $is_front_page;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen