victorpavlov
5/30/2013 - 9:21 AM

PHP: Drupal 7 custome template for node view mode Reference: http://drupal.stackexchange.com/questions/27025/how-to-provide-template-for-

<?php 
function MYTHEME_preprocess_node(&$vars) {
  if($vars['view_mode'] == 'teaser') {
    $vars['theme_hook_suggestions'][] = 'node__' . $vars['node']->type . '__teaser';   
    $vars['theme_hook_suggestions'][] = 'node__' . $vars['node']->nid . '__teaser';
  }
}
?>