0

There is a vocabulary which has an additional field 'field_icon' I have a view that displays nodes of a certain content type.

I am looking to display all the term's field_icon associated with each node.

I have then added the relationship of Content: Taxonomy terms on node and added the field_icon using this relationship. But it is only displaying 1 icon. Not all.

When you look to configure that field, there is no MULTIPLE FIELD SETTINGS option.

How do I display all terms associated with a node in views.

EDIT
See screenshot attached
The vocabulary the field_icon is in is call 'Key Elements' enter image description here

enter image description here

2 Answers 2

1

It would help if you could include a screenshot of your view. But based on your post (I am assuming each term only has one icon), it seems like you may need to aggregate your view. If this is a Drupal 7 site, I also recommend using the module Views Merge Rows, which allows you to choose a separator for when there are multiples after grouping.

3
  • This module worked well, but it does not allow the use of a pager. Is there another module or method? I had tried to aggregate the view with no luck. What aggregate settings would I use on each field?
    – IamOnStage
    Jul 11, 2018 at 10:51
  • After seeing the View, I do think that Views Merge Rows could be your best bet, as it allows you to display the first item only for a given field. I think with the set-up, aggregation alone will not help. About the pager, I don't really know how to help, but maybe you could add a feature request on Views Merge Rows.
    – andileco
    Jul 12, 2018 at 14:38
  • 1
    You can patch that module: https://www.drupal.org/project/views_merge_rows/issues/2188939
    – prkos
    Jul 12, 2018 at 15:22
1

Instead of adding the general Content: Taxonomy terms Relationship that can relate to all Vocabularies, you need to add the Relationship to the specific Field referencing your terms with icons: Taxonomy term referenced from field_whateverTermField in the Content category. It will say field_whateverTermField: Taxonomy term after you add the Relationship.

Once you have the Relationship, you can add the Field field_icon and make it use the above Relationship. You will have the Multiple field settings options available this time so all icons will display together if you choose to show all in one row.

6
  • I add the relationship "Content: Key Elements (field_key_elements)" and then add the field "Taxonomy term: Icon" but there is no Multiple field settings?
    – IamOnStage
    Jul 4, 2018 at 9:20
  • Note I have also tried disabling Views Distinct, but with still no luck. The multiple field settings option still is not there.
    – IamOnStage
    Jul 4, 2018 at 9:28
  • You're using D7 so wording is a but different (my answer applied to D8), but you seem to be using the correct the Relationship. Is your Icon field a multi-valued field? Are you using more than one image for the same term? If not, then it doesn't make sense to have Multiple field settings! Take a better look at your Views results. Do you see all icons, only in separate rows and not all together? If yes, then it's not a multi-value field issue or showing all terms, it's about combining the Views Results, look at the Answer from andileco.
    – prkos
    Jul 4, 2018 at 16:19
  • No, the icon field is single valued - each term has 1 icon. I would like to display all the terms field_icon. I only see 1 term/icon.
    – IamOnStage
    Jul 10, 2018 at 10:27
  • Then you won't have Multiple field settings, you only have one icon per term. Do you see your nodes listed in the Views results more than once? They should be listed as many times as you have terms/icons attached on them. To make the nodes be listed only once, but have all the icons showing on that same row, use the andileco answer (module Views Merge Rows).
    – prkos
    Jul 10, 2018 at 14:34

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.