0

I have a view that renders a node page as a view, that node has e.g. 100 images, so technically they are all on same node, so then we go to views fields settings and untick the option to show images in same row. So now each image has it's own row.

Now we add the relationship for file to enable extra fields. We add the File field and it also gets printed next to every image.

Except problem is that it prints the same and only path of the very first image under every other image. It should print the path of each image in the same row.

enter image description here

EDIT: tried the https://www.drupal.org/project/image_url_formatter module, same. It outputs the very same first image field only.

View: enter image description here

  • Could you post a bit more info about your View? I am not sure how to replicate your setup. – Stefanos Petrakis Sep 20 '16 at 17:33
  • A screenshot of your views config would also help. Cheers! – Stefanos Petrakis Sep 20 '16 at 18:04
  • Hi. See update, please. – user13176 Sep 20 '16 at 18:48
0

This is expected behaviour following from your Views configuration, there is no way to instruct Views to maintain a 1-1 relation between the (File) File: Path (which gives you one file path for each image) and the Content: Image (which gives you one image formatted field with multiple images included). As a result, they are 'combined' (cartesian product) and you should actually be getting a very long list of all combinations of images and image paths.

By using the Image URL Formatter module you should be able to do what you need, here is a screenshot:

enter image description here


I added the "Content: Image" field twice, each time unticking the "show images in same row" option. The first one was formatted as an Image, the second one as an Image URL. And things worked as expected.

Good luck!

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.