/** * Verifica se a pagina atual � a pagina frontal. * * @return * Boolean value: TRUE se a pagina atal � a pagina frontal; FALSE para todas as outras. */ function is_frontPage() { static $is_front_page = null; 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'] == get_normalPath(variable_get('site_frontpage', 'node')); } return $is_front_page; }
private function LoadPath() { if (!empty($_GET['q'])) { $_GET['q'] = get_normalPath(trim($_GET['q'], '/')); } else { $_GET['q'] = get_normalPath(variable_get('site_frontpage', 'node')); } }