The concepts around drupal view mode and drupal view display are really confusing. View and display have similar meanings in English, which makes digesting these drupal concepts harder. In this article, we have sorted out the concepts around ‘view mode’ and ‘display’, and tried to give a very clear picture of what they are.
I drew a diagram to show the relationship between them. In order for quick understanding, I avoid the UML style diagram and just use some common senses to mark the relationship.
I’ll go over every related glossary. Hopefully, you’ll able to have a better understanding of the above diagram in the end.
Glossaries around Drupal View Mode
Data
There are four types of drupal data – content, configuration, state, and session. Generally speaking, whatever is stored in the drupal database is drupal data.
Content
Content is what is displayed to the user. It can be text, images or files, etc.
Content Type
Content belongs to a content type. You can freely name your content type, although the system has a default content called Article. Please note, every content type has a default view mode.
Content Item(s)
An instance of content is called a content item.
View
A list of content items is a view. It is a logical existence and you won’t be able to see it.
View Display (or Display)
View display defines how a view presents to users. It can be a page, a block, an attachment, an entity reference, an embed, or a feed. The view mode associated with the display tells what is to display.
View Mode
View mode defines how fields of entities (content, comments, users, taxonomy terms, and custom blocks) are shown to users.
Content View Mode
Content view mode tells which fields of content shall be shown or hidden to users. If the field is about to show, it also defines what format it will be. You may come up with whatever name you like, though the system has full, teaser, and other defaults. Also, please note that every content type has a default view mode.
Further reading
Hopefully, with the help of the diagram, you’ll be able to sort out this mess. For further reading, you can refer to the drupal glossary for more drupal terminologies. Our site also offers quite a few drupal tutorials.
If you have any suggestions to improve the above diagram, please leave a comment below.