Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By XS2ICE on
Hi everybody.
I have a node with a reference to a term as a field. This reference can contain multiple values.
The Vocabulary, with all the terms, also provides a nice picture for each term.
I would like to make a block view containing the pictures based on the terms that are selected in the node.
But for some reason, I can't make this happen. Sometimes, the block doesn't appear, sometimes it shows one picture multiple times. It has something to do with the contextual filters, but that's as far my view-knowledge goes.
Hope that you can help me.
Thanks in advance
Comments
I suppose you used a
I suppose you used a Relationship for the pictures and you linked it to the vocabulary.
I don't understand why sometime block doesn't show up (Maybe it could be related to no result found or the size of the pictures requested?).
For the duplicates, you have a box you can check in some filter criteria, that can solve the problem in some cases. Otherwise, you can use "Distinct" or "Aggregation" to solve this problem: Look at this.
There might be a better solution for your problem. But I thought this could help.
Yes!
Yes!
The Distinct option solved the problem! Thank you very much Ambroise A.
(You are right: I had made a relationship, but I was struggling with the contextual filters.)