Skip to content

Instantly share code, notes, and snippets.

@gormus
Created June 29, 2012 20:12
Show Gist options
  • Save gormus/3020361 to your computer and use it in GitHub Desktop.
Save gormus/3020361 to your computer and use it in GitHub Desktop.
Drupal 7 - adding new view modes
<?php
/**
* Implements hook_entity_info_alter().
*/
function MYMODULE_entity_info_alter(&$info) {
$info['node']['view_modes'] += array(
'node_feature' => array(
'label' => t('Featured'),
'custom settings' => TRUE,
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment