Slowly losing my mind here:
I need to make a template for the terms of a certain vocabulary. I created a sub-theme and am trying to use theme_preprocess_page() ( theme_preprocess_taxonomy_term() is somehow never called ).
template.php
function aura_sub2_preprocess_page(&$variables) {
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
$term = taxonomy_term_load(arg(2));
drupal_set_message( 'page__vocabulary__' . $term->vocabulary_machine_name );
$variables['theme_hook_suggestions'][0] = 'page__vocabulary__' . $term->vocabulary_machine_name;
}
}
As you can see I even overwrite the first suggestion for testing purposes but it changes nothing. The page loads as if nothing ever happened. When I open "mydomain.com/?q=en/myvocabulary/someterm" I get the status message "page__vocabulary__myvocabulary". So far so good but the template suggestions is seemingly ignored. The template resides in the "theme" directory of that sub-theme. I tried every possible combination of "--" and "__" to no avail. The template only contains this, is that a problem?:
theme/page--vocabulary--myvocabulary.tpl.php
<h1>MYVOCAB TEST</h1>
Cache has been cleared each time, no change. :c
Any ideas?