function node_example_entity_info_alter
Implements hook_entity_info_alter().
We need to modify the default node entity info by adding a new view mode to be used in functions like node_view() or node_build_content().
Related topics
File
-
node_example/
node_example.module, line 202
Code
function node_example_entity_info_alter(&$entity_info) {
// Add our new view mode to the list of view modes...
$entity_info['node']['view modes']['example_node_list'] = array(
'label' => t('Example Node List'),
'custom settings' => TRUE,
);
}