Last active
December 20, 2015 10:59
-
-
Save sebcunin/6120095 to your computer and use it in GitHub Desktop.
Création d'un nouveau mode d'affichage pour l'entité Node
This file contains hidden or 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(). | |
| * @link http://www.wunderkraut.com/blog/drupal-7-custom-node-view-modes/2010-12-20 | |
| */ | |
| function MYMODULE_entity_info_alter(&$entity_info) { | |
| $entity_info['node']['view modes']['another_teaser'] = array( | |
| 'label' => t('Another teaser'), | |
| 'custom settings' => FALSE, // TRUE pour avoir le nouveau d'affichage déjà activé dans l'onglet Custom display settings | |
| ); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment