Ejemplo n.º 1
0
/**
 * 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;
}
Ejemplo n.º 2
0
 private function LoadPath()
 {
     if (!empty($_GET['q'])) {
         $_GET['q'] = get_normalPath(trim($_GET['q'], '/'));
     } else {
         $_GET['q'] = get_normalPath(variable_get('site_frontpage', 'node'));
     }
 }