I'm a bit confused about how to name my template files. It's the first time I started to mess with templates in drupal 7 and somehow I don't get it.
I want a template file that changes the behavior of my blog posts which are on my front page. In Drupal 6 a file named node-blog.tpl.php was all I needed to mess with my blog posts.
I tried the same with Drupal 7, but it didn't work. I searched for an answer and read that the following function should be relevant for choosing the template files.
function template_preprocess_node(&$variables) {
...
// Clean up name so there are no underscores.
$variables['theme_hook_suggestions'][] = 'node__' . $node->type;
$variables['theme_hook_suggestions'][] = 'node__' . $node->nid;
}
I also read about some conversion between '-' and '_' because '-' could not be used in function names. So I tried a few variants.
node__blog.tpl.php
node--blog.tpl.php
node-blog.tpl.php
node_blog.tpl.php
None of them is recognised by Drupal. What am I doing wrong?