Score:0

How to use a view mode for all the content entities

jp flag

I would like all the nodes for the "Services" content type to use the "Demo" view mode.

Structure -> Content type > Services > Manage Display tab shows 3 view modes: Default, Demo, and Teaser.

Structure -> Content Type -> Services -> Manage Display -> Demo view mode: I have one field "Marketing headline" enabled.

I added a node for the Services content type. When I visit the node, I see Body and Marketing headline but I was only expecting to see the Marketing headline field value. How can I configure in a way that all the nodes of the "Services" type use the "Demo" view mode?

Here are few screenshots:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

id flag
Does this answer your question? [How to change Display modes per node (view modes)?](https://drupal.stackexchange.com/questions/193319/how-to-change-display-modes-per-node-view-modes)
GreenTree avatar
jp flag
I was thinking to be able to do it using the UI without programmatically. I am just not sure how to configure a content type to a particular view mode "Demo". If Drupal allows me to create a view mode, I also expected to be able to configure it via the UI.
Score:1
mx flag

If all nodes should be displayed a certain way you should edit the Default view mode to do it.

Creating a new view mode doesn't automatically make it being used on the content type, that is why you're still seeing the Body content.

Or if you really need to use the Demo view mode you need to provide a way to display the nodes that way. That can be done with Views, but you should be mindful about what in the end ends up visible to users, because the default paths will remain and they will use the Default View mode.


Alternatively, you could use a module that creates a page for each of the view modes: View Mode Page, although that may be an overkill in your case, you probably don't want extra paths diluting your content.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.