Drupal 7 分类根术语视图显示
我目前使用 Drupal 7 进行了类似的分类设置:
-root1
--child1
--child2
-root2
--child3
--child4
类似于国家/省层次结构。
我想做的是根据父 ID 创建不同术语的视图。因此,如果用户单击 root1,您将看到 child1 和 child2。现在,我已经使用页面视图和配置上下文过滤器进行了此设置:分类术语:父术语
。
这是我的问题,如何显示根术语?基本上我不想传递任何内容,也许以某种方式设置一个默认值,以便 root1 和 root2 显示在页面上。
当前设置:
当过滤器值位于 URL 中或提供默认值时
指定验证标准
验证:分类术语
过滤器值类型:术语名称转换为术语 ID
我还尝试将其仅设置为术语 ID 并设置默认值 0,希望这会捕获父 ID 为 0 的任何术语,但没有显示任何内容。
I currently have a taxonomy setup like so using Drupal 7:
-root1
--child1
--child2
-root2
--child3
--child4
Something like a country state/province hierarchy.
What I would like to do is create a view for the different terms based on the parent id. So if a user clicks on root1 you would see child1 and child2. Now I've currently have this setup using a page view and using a Configure contextual filter: Taxonomy term: Parent term
.
Here's my problem, how do I display the root terms? Basically I want to pass nothing in and maybe somehow setup a default value so that root1 and root2 are displayed on the page.
Current settings:
WHEN THE FILTER VALUE IS IN THE URL OR A DEFAULT IS PROVIDED
Specify validation criteria
Validation: Taxonomy Term
Filter value type: Term name converted to Term ID
I've also tried setting it up as a Term ID only and setting a default value of 0 hoping this would grab any terms with the parent ID of 0 but nothing displays.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
D6 中的这个问题可以使用 Hierchical Select 轻松解决。但HS模块尚未完全移植。
关于 hs_views 子模块的问题页面:
http://drupal.org/node/1170192
This problem in D6 could be resolved easily using Hierchical Select. But the HS module is not fully ported yet.
The issue page about the hs_views submodule:
http://drupal.org/node/1170192