0

I have a content type called "exhibition" that contains many images added via the standard image field. I also have a separate content type called "video" that uses an entity reference to point to an "exhibition". Each video node has a single image field for a thumbnail.

I want to create a block view that will be displayed on each exhibition's page in a sidebar that combines thumbnails of the exhibition's images with thumbnails of any videos linked to that node. How can I create this sort of combined view?

For example:
node/100 is an exhibition containing: image_1.png,image_2.png,image_3.png

node/200 is a video linked to node/100 containing: videothumb_1.png
node/201 is a video linked to node/100 containing: videothumb_2.png

I want a block to display in the sidebar of node/100 that renders the following:

image_1.png,image_2.png,image_3.png,videothumb_1.png,videothumb_2.png

I am experienced enough with Views that I can create a working block that displays image_1.png,image_2.png,image_3.png. I can also easily create a second block using relationships that correctly displays videothumb_1.png,videothumb_2.png. What I would like to do now is combine these separate block views into a single block. My attempts to combine the two seems to always lead to repeated images from the exhibition paired with repeated images from the videos.

0

if you can't get it to work any other way, you could try using Views Field View to combine the two:

This module allows you to embed a view as a field in a view. A new field handler is made available, so this can also be used in area (header/footer/empty) handlers as well as rows.

This view handler can accept arguments from fields of the parent view using tokens and pass them into the child view for each row. Raw or rendered token values can be used, as well as static values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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