View modes allow site builders to display the same piece of content in various ways. Drupal ships with a bunch of them out of the box like Teaser, “Full content”, RSS and much more. There is even one for the search result page called “Search result”. However, the two most prominent are Teaser and “Full content”.
The “Full content” view mode is the one used to display content on its “node/123” page. It’s the one you’ll customise the most. Teaser, on the other hand, is used to display a summarised or trimmed down version of an article.
You can create as many view modes as necessary. But like many things in Drupal, they can be created in a few ways. They can be implemented using code and with a module or two.
In this tutorial, you’ll learn how to create view modes in three ways: using hook_entity_info_alter(), using Display Suite and Entity view modes.