Drupal:如何构建分类菜单树
我需要根据分类术语构建自定义菜单结构。问题是只有第一级应该是分类术语。所有嵌套项都必须是一个节点。每个节点只能有一个 Term。没有任何关联节点的术语不应出现在菜单中。
我怎么能这么做呢?对我有什么建议吗?
示例菜单:
TERM-1
Node-1
Node-2
Node-3
TERM-2
Node-1
Node-2
...
谢谢。
编辑 我需要这个作为摄影师网站。每个术语都是一个全局类别,例如肖像
或艺术家
。类别只是画廊的包装。根据上面的示例菜单,可能的结构可能如下所示:
Series (Term)
Bodies (Node:Type->Gallery associated with Term:Series)
Classic Cars (Node:Type->Gallery associated with Term:Series)
Surroundings (Node:Type->Gallery associated with Term:Series)
I need to build a custom menu structure based on taxonomy terms. The Problem is that only the first level should be a Taxonomy-Term. All nested items must be a node. Each node can have only one Term. And Terms without any nodes associated should not appear in the menu.
How could i do that? Any suggestions for me?
Example Menu:
TERM-1
Node-1
Node-2
Node-3
TERM-2
Node-1
Node-2
...
Thank you.
Edit
I need this for a photgrapher website. Each term is a global categorie like Portraits
, or Artists
. Categories are only a wrapper for galleries. Based on the example Menu above a possible structure could be something like this:
Series (Term)
Bodies (Node:Type->Gallery associated with Term:Series)
Classic Cars (Node:Type->Gallery associated with Term:Series)
Surroundings (Node:Type->Gallery associated with Term:Series)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议带着观点这样做。您将需要创建一个列出节点的视图,并将该视图设置为按分类术语分组。
因此,创建一个新视图 (admin/build/views/add)
I would suggest doing this with a view. You will want to create a view which lists nodes, and set the view to group by taxonomy term.
So, create a new view (admin/build/views/add)
分类菜单路径解决了这个问题。
Taxonomy menu trails solves this problem.