i have a content type 'product', and two taxonomy lists 'company' and 'country'.
Country list has one level of depth like:


Each product has a 'company' field. Each 'company' term has a 'country' field.
I'm trying to create a view for 'product', filtering by 'country'.
By adding the relationship "content: Company" i have only "taxonomy term: field_country" filter without depth.
There is a way to filter with depth like "Has taxonomy term (with depth)" ?

I'm on drupal 7

  • google.ae/…
    – Bala
    Sep 12, 2013 at 13:45
  • sorry, i've tried to googling a lot, but what i need is different or is little bit more complex...the solution seems to be a sort of relation chain, or multiple relation...
    – user20924
    Sep 12, 2013 at 17:01
  • I'm too interested in this. Haven't found any solution for Drupal 8. Have you solved this issue since then?
    – Meglio
    Nov 8, 2017 at 7:03

2 Answers 2


You would not require a Relationship, just two Contextual Filters.

Based on your requirements Company would be one Contextual Filter - Content: Has taxonomy term ID and Country would be a second Contextual Filter - Content: Has taxonomy term ID (with depth).

  • I need to expose filters, however Content: Has taxonomy term ID (with depth) don't work. Calling directly the 'Country' vocabulary it give me no result. Only by creating a relationship 'Content : Company' it give me 'Taxonomy term: Counrty (field_company_country)' and so i can filter but without depth.
    – user20924
    Sep 12, 2013 at 20:03
  • Seems like I misunderstand, when you say "Each 'company' term has a 'country' field." do you mean that you have a second taxonomy vocabulary on the 'product' content type called 'country'?
    – pxwise
    Sep 12, 2013 at 20:51
  • I mean that i have a vocabulary called 'Company' and a vocabulary called 'Country' each 'Company' term has an extra field called "Country" that is a Term Reference field.
    – user20924
    Oct 24, 2013 at 17:39

In D7, you can only do that with the node table (the content).

If you want to have a working solution for every entity of your system, you have to use this module.

Once installed, don't forget to rebuild the index of your entities, then, in views, you'll have the possibility to add a new relationship ('Taxonomy Entity Index: Taxonomy terms on User') and a filter with depth ('Taxonomy Entity Index: Has taxonomy terms on User (with depth and indexed in taxonomy_entity_index)').

  • 1
    The OP is not talking about user entities, but nodes. Answers should be tailored for the question being asked.
    – apaderno
    Jun 16, 2014 at 11:15

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.