Here is a patch allowing to :
- Choose the view mode per bundle.
- Choose to print entity or not based on the entity bundle.
Example of use cases (especially interesting with Media Entity, Paragraphs, etc.) :
- Media Entity : allow to print the first video or image or all videos, all images, etc.
- Paragraphs : print all the "text + image" paragraphs, or print only the first Text + image paragraph, etc. Interesting for example to create the teaser mode (in a View, get the first "Image paragraph" and the the begining of the first "Textual paragraph").
Hope it's clear and interesting ;-)
Maybe we could also :
- Add a summary for that.
- Get only the active view modes per bundle.
- Put everything in a collapsed fieldset.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | bundle-handling.patch | 4.59 KB | eme |
Comments
Comment #2
eme commentedLittle correction.
Comment #3
s_leu commented@eme
Thanks for the patch, but as you can read here, it's not compatible with the way a patch for a Drupal patch should look like, see also the discussion here: https://drupal.stackexchange.com/questions/110784/how-make-patch-in-phps...
Please refer to these instructions https://www.drupal.org/node/707484 and re-create it.
Also before i can commit this, your ideas do absolutely make sense, i.e.
So if you could yet add this and create the patch as i suggested above, i'll do a review afterwards.