Drupal7 custom view modes

Keywords

The basic idea from Drupal 7 custom node view modes:

/**
* Implements hook_entity_info_alter().
*/
function MYMODULE_entity_info_alter(&$entity_info) {
  $entity_info['node']['view modes']['another_teaser'] = array(
    'label' => t('Another teaser'),
    'custom settings' => TRUE,
  );
}

..
To get the most out of this we’ll propably want to add a custom node.tpl.php template for this view mode
...

/**
* Implements hook_preprocess_node().
*/
function MYMODULE_preprocess_node(&$vars) {
  if($vars['view_mode'] == 'another_teaser') {
    $vars['theme_hook_suggestions'][] = 'node__' . $vars['type'] . '__another_teaser';
  }
} 

...
Duplicate standard node.tpl.php for the content type you need, like node--article--another-teaser.tpl.php. (NOTE: use underscores in template suggestions, dashes in the filename). ... There are many other ways to get the exactly same outcome, like the Display Suite module, but seems to be an overkill for a simple need what we just covered.

From Custom Drupal 7 view modes: Different ways to see your content (2012, Julia Sifers):

'It’s also important to keep in mind that individual view mode configurations (as applied to content types) are not as easily exportable/importable as field-based views are. Theoretically, you can accomplish this through Features, but Features has its own complications in terms of site maintainability which may or may not suit your environment.'
Visit also