在节点页面上显示Drupal分类子类别(子项)

时间:2010-10-21 09:06:07

标签: drupal drupal-6 drupal-taxonomy

我想请一些Drupaler帮忙。是否可以在节点页面上显示分类术语的子类别?让我们说像这样的分类:

category 1
       subcategory 1
       subcategory 2
       ...

我希望Ubercart产品在节点页面上显示类别1中的项目具有以下子类别(例如产品)subcat。 1.并列出分类学子类别的链接。

Heading
some text...
List of subcats...
footer.

它不必按此顺序排列。它只是说明了这个想法。这可能吗? 在此先感谢您的帮助。

2 个答案:

答案 0 :(得分:1)

大家好,感谢您的回复。我找到了一种如何使用模块实现这一目标的方法。

 1. Enable Taxonomy menu module
 2. Enable menu block module
 3. Choose in the menu block created your taxonomy menu
 4. Check the "Make the starting level follow the active menu item." option and place the block in your content region :-)

编写几行PHP代码可能并不容易,但即使对于非程序员来说也是非常充分的解决方案,它也可以很容易地修改。

答案 1 :(得分:0)

1 - 在你的node.tpl.php中放入一些条件来检查你要加载子类别的那个页面
2 - 获取您将从$ node变量获得的分类术语名称或termid 3 - 调用此函数并传递适当的参数taxonomy_get_children($ tid,$ vid = 0,$ key ='tid')

我希望它会起作用

相关问题