How to provide template for particular view mode? I want to theme the search result view mode with a template.

I had it in my head that naming a template file node--article--search-result.tpl.php would do the trick, but I'm obviously wrong about that.

I realise I can do node--article.tpl.php and within this check $view_mode, but this is awkward with all the other view modes that I don't want to template.

Ideas?
Adding theme hook suggestions in a node preprocess function should do the trick:

function MYMODULE_preprocess_node(&amp;$vars) {
  if ($vars['node']-&gt;type == 'article' &amp;&amp; $vars['view_mode'] == 'search_result') {
    $vars['theme_hook_suggestions'][] = 'node__article__search_result';
  }
}


After clearing the caches you should be able to use node--article--search-result.tpl.php for your template file name.

NB. You could also do this in your theme's template.php file by calling the function MYTHEME_preprocess_node() instead.