Search code examples
drupaldrupal-viewsdrupal-taxonomy

How do i list all children terms of related term in Drupal Views


I'm really struggling with trying to find an answer for this and have spent 6 hours searching and messing around in views. Let me explain.

I have two taxonomy vocabularies: Catalog and Fabric. I have a list of Fabrics in Fabric in a hierarchical structure similar to the following:

Seasonal-2010
-Company
--Fabric Designer
---Fabric Collection
----Fabric Name
Seasonal-2009
-Company
--Fabric Designer
---Fabric Collection
----Fabric Name

In the Catalog vocabulary I have catalog categories: Christmas, Spring, Summer etc. I have related (using the Taxonomy Vocabulary Relate module), the Christmas term in Catalog with Seasonal-2010 term in Fabric.

What I am trying to do is pass in the Term ID for Christmas and display a list of all the Fabric Names in that category. So what I need to do is get TermID then get Related Terms then get Children for the related terms.

I've already made a view which outputs the Related Term, now all I need to do is get the children. In a different view I can get the immediate children (ie the company) but not their children and so on. Does anybody have a suggestion?


Solution

  • I Don't know what exactly the answer... But you can use node hierarchy module. This is a very good module for the hierarchical view.Hope this will help you out.