View mode theme name priority I have a theme set for view mode 'Teaser'. The theme name for this is named like this: node--teaser.tpl.php. So far so good.

Then I created content type 'something' and I would like to create a Teaser theme specific for my new content type 'something'. I have thus named my custom Teaser theme as node--something--teaser.tpl.php. I was expecting this more specific theme name to override theme node--teaser.tpl.php (broader, less specific), but it doesn't work that way. node--teaser.tpl.php has priority over node--something--teaser.tpl.php. Is this really the expected behavior for theme names priority? I would expect the more specific to 'beat' the less specific broader name.

Is it possible to force the more specific theme in template.php function theme_preprocess_node?
This page Drupal 7 Template (Theme Hook) Suggestions explains the topic.

To investigate for yourself:

Install Devel module. Add this bit of code to your theme's template.php file (check if the function does not already exist):

function MYTHEME_preprocess_node(&amp;$variables) {
  dpm($variables);
}


Then inspect the theme_hook_suggestions key. It will look something like this:



This show the suggestions available. To convert it to a tpl.php file just convert underscores to hyphens and add the extension tpl.php.

You can also create your own suggestions by adding this code into preprocess_node:

if ($variables['type'] == 'article' &amp;&amp; $variables['view_mode'] == 'teaser') {
  $variables['theme_hook_suggestions'][] = 'node__article__teaser";
}


Here I am checking for the view mode teaser and adding a theme suggestions based on that. You can check for other conditions as well and add your own suggestions as you please.

Some themes add their own suggestions so always inspect it with dpm() first.