Add custom view mode

Public

Add custom view modes for display

Get raw version
php
  1. /**
  2.  * Implements hook_entity_info_alter().
  3.  */
  4. function YOUR_THEME_entity_info_alter(&$entity_info) {
  5. $entity_info['user']['view modes']['contributor'] = array(
  6. 'label' => t('Contributor'),
  7. 'custom settings' => FALSE,
  8. );
  9. }

Comments