Entity API

Add an extra view mode to an entity

The extra view mode is added to the entity by using hook_entity_info_alter.

In this example the node entity is expanded so a hook_preprocess_hook theme function is used to add all available theme modes as template suggestions to the node. Templates like node--article--teaser.tpl.php and node--article--teaser-overview.tpl.php are now available.

Subscribe to RSS - Entity API