1

I am working in Drupal 8.

I have a content type defined with an image field. For each page of that content type, I upload one or more images for its image field.

I want to create a block view in Views that presents images in a grid. How do I filter the block view so that the only images displayed are the ones for the image field of the current node? The block will be placed in the block layout for this content type. It is easy to create a view that creates a grid with images from all pages of this content type. I am stumped on how to filter the view so only images for the current mode are displayed.

1 Answer 1

0

Got it figured out. In Views, goto Advanced,Contextual Filters. Select Node ID. Select "Provide default value". Select "Content ID from URL".

To only display this field only using Views, goto Content Type, and under Manage Display, set the both the label and format for the image field to hidden.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.