0

i have a problem.

1 i've created a new page called Contacts, machine name is contacts 2 ensured, the path is correctly assigned (/contacts) 3 saved my page.tpl.php as page--contacts.tpl.php 4 even added some php code in my template php (see below)

function mytheme_preprocess_page(&$vars){
    //some syntax bla bla
    $alias = drupal_get_path_alias(current_path());
    $vars["theme_hook_suggestions"][] = "page--" . $alias;
}

and my custo template still doesn't show up!

eyurdakul
  • 894
  • 2
  • 12
  • 29

1 Answers1

1

hmm i believe you have to replace the dashes with underscores in your theme_preprocess_page hook;

function mytheme_preprocess_page(&$vars){
    //some syntax bla bla
    $alias = drupal_get_path_alias(current_path());
    $vars["theme_hook_suggestions"][] = "page__" . $alias;
}
eyurdakul
  • 894
  • 2
  • 12
  • 29