Drupal 8 Tips: Display Only One Image From Multifield Image On Teaser
On Drupal 8, there is a useful feature in Views Module (now in Core) settings called "Multiple field settings" with which we can display only one image from multifield image on teaser. As seen in the image above, each of the content has multiple images but only one is displayed in the teasers.
Related
Steps:
- Create a new content type of edit and existing one
- Add a field to upload images if not already and set to allow multiple image uploads
- Save the content type
- Go and create a new view to display the content types
- Format the view the way you want
- Now for the images, click on "Content: Upload images" to go to its settings
- Click to expand "Multiple field settings"
- Find "Display value(s)" and set it to 1
Sumber http://techubber.blogspot.com/
0 Response to "Drupal 8 Tips: Display Only One Image From Multifield Image On Teaser"
Post a Comment