Created
June 29, 2012 20:12
-
-
Save gormus/3020361 to your computer and use it in GitHub Desktop.
Drupal 7 - adding new view modes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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