简体   繁体   English

如何在Drupal视图中列出相关术语的所有子术语

[英]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. 我真的很想尝试找到答案,并且花了6个小时来搜索和弄乱视图。 Let me explain. 让我解释。

I have two taxonomy vocabularies: Catalog and Fabric. 我有两个分类词汇:Catalog和Fabric。 I have a list of Fabrics in Fabric in a hierarchical structure similar to the following: 我有一个类似于以下结构的层次结构中的Fabric中的Fabric列表:

Seasonal-2010 季节性2010
-Company -公司
--Fabric Designer -面料设计师
---Fabric Collection ---面料系列
----Fabric Name ----面料名称
Seasonal-2009 季节性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. 在目录词汇表中,我具有目录类别:圣诞节,春季,夏季等。我已经关联(使用分类法词汇相关模块),即目录中的圣诞节术语与Fabric中的Seasonal-2010术语。

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. 我想做的是传递圣诞节的Term ID,并显示该类别中所有结构名称的列表。 So what I need to do is get TermID then get Related Terms then get Children for the related terms. 因此,我需要做的是获取TermID,然后获取相关条款,然后获取相关条款的子级。

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? 有人有建议吗?

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. 这是用于分层视图的非常好的模块。希望这对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM