Keeping it consistent: Entity View Modes

  • Alex Davidson's picture
    January 6, 2014

One the great things about entities is their view modes. This allows different modes of viewing entities. It also allows sharing view modes between different bundles. What this means is that one could set up a view to list content, such a search view, and use a listing view mode to show different content with their different fields but still displayed in a unified listing.

Another advantage of view modes is keeping a consistent look and feel for your website. Once the view mode is created for the content type, it can be used throughout the website. This proves particularly handy for listing type views.

Originally, defining your own view modes required one to create a module. However, using the module Entity View Modes, all your views modes can be defined from within the admin configuration screen. Thus, there's really no reason to not define your own view modes. Once you have them all set up, it's as simple as changing your view(s) to render the content using your newly created view modes.