I have a parent theme as a basis for a multisite installation. Right now, I'm working on a child theme which has to have some custom templates. Here's my preprocess function in my child theme:
$orig = $vars['theme_hook_suggestions'];
$manual = array('page__node', 'page__node__%', 'page__node__96', 'page__gallery', 'page__drisco_gallery');
dpm(array_diff($manual, $orig));
dpm($manual);
dpm($orig);
$vars['theme_hook_suggestions'] = $manual; // Loads my page--gallery.tpl.php template and works as expected.
$vars['theme_hook_suggestions'] = $orig; // Ignores my template, just uses page.tpl.php
The template only loads if I create the array by hand, even though it's apparently identical to the one already there. Here is what dpm()
outputs:
... (Array, 0 elements)
... (Array, 5 elements)
0 (String, 10 characters ) page__node
1 (String, 13 characters ) page__node__%
2 (String, 14 characters ) page__node__96
3 (String, 13 characters ) page__gallery
4 (String, 20 characters ) page__drisco_gallery
... (Array, 5 elements)
0 (String, 10 characters ) page__node
1 (String, 13 characters ) page__node__%
2 (String, 14 characters ) page__node__96
3 (String, 13 characters ) page__gallery
4 (String, 20 characters ) page__drisco_gallery
Does anyone have a clue of what I'm doing wrong?