adaptdk / er_viewmode

Allows selection of viewmode per referenced entity
3 stars 4 forks source link

Provide option to exclude the default view mode #6

Closed MrPaulDriver closed 7 years ago

MrPaulDriver commented 8 years ago

Very cool module:-)

Please include the default view mode in the list of 'enabled view modes' so that it can be excluded if not checked.

EDIT. I ask this because very often the default view mode is that of the full page content and this is often not suitable for simple a simple display.

lucasconstantino commented 7 years ago

Hi there. Just for your information:

/**
 * Implements hook_er_viewmode_get_view_modes_alter().
 */
function hook_er_viewmode_get_view_modes_alter(&$view_modes, $field, $instance) {
  unset($view_modes['full']);
}