0

Let me start by saying I'm fairly new to Drupal. I'm using Drupal 7.

I have a content type "product" which is assigned to one or more taxonomy terms in "collections" (taxonomy). Then I have another taxonomy called "brands".

The "brands" taxonomy has a field reference to a "collections" taxonomy term. For instance: brand "Google" can be assigned to collections "Shoes" or "Bags".

On the collection page for "Shoes", all the products tagged "Shoes" are being displayed. On top of the page, I want to add a list of all the brands in the "brands" taxonomy, that are assigned to this particular collection ("Shoes"). They are independent from the products themselves. How would I display this list on top of the page? Do I need to create a custom overview?

1

In this case you need to a create view that displays block on top of the collection page.
The view should display taxonomy terms in the "collections" vocabulary filtered by a contextual filter (taxonomy term id) so that only the desired taxonomy term is display.
Next you should add a relationship using the field reference you're using on that term.
Finally you can use the relationship to display fields or taxonomy terms to the display.

I tried to explain it briefly, let me know if you need further explanation.

  • Thanks for your answer! So if I understand correctly, I need to create a view for displaying the brand list on top of the collection page? This is independent from the collection page itself? How do I add this relationship? – Pim Oct 10 '16 at 12:25
  • 1
    I hope this article helps you out: atendesigngroup.com/blog/… – Ismail Cherri Oct 10 '16 at 13:42
  • Thank you very much! I will take a look at it, and accept your answer as soon as I know for sure it was the right one :) – Pim Oct 10 '16 at 13:48

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.