I have this preprocess function:
function drisco_preprocess_page(&$vars) { $node = $vars['node']; $vars['theme_hook_suggestions'][] = 'page__node__' . clean_class($node->title); array_unshift($vars['theme_hook_suggestions'], 'page__node__' . clean_class($node->title)); dpm($vars); }
dpm()
tells me my suggestion array looks like this:
0 (String, 26 characters ) page__node__hotel-overview 1 (String, 10 characters ) page__node 2 (String, 13 characters ) page__node__% 3 (String, 14 characters ) page__node__68 4 (String, 10 characters ) page__page 5 (String, 11 characters ) page__hotel 6 (String, 26 characters ) page__node__hotel-overview
My template file is called “page–node–hotel-overview.tpl.php” but isn’t being used. I have page.tpl.php template file in my theme dir.
What am I doing wrong?
If I erase the template suggestions array and replace it with my own with only one file in it like thus, it loads the template. If I append or prepend the same suggestion, it just loads page.tpl.php.
$vars['theme_hook_suggestions'] = array('page__node__68');
This is a child theme; could that be making a difference?
Sponsored by SupremePR