Drupal 节点层次结构和视图参数
我正在构建一个 Drupal 网站,该网站具有使用节点层次结构模块创建的简单层次结构:
-个人培训
-训练营
--地点
--Instructors
每个父菜单项至少有两个与其关联的“价格标签”节点(通过节点引用 CCK 字段)。我正在尝试创建一个显示在所有父页面和子页面上的视图块,但仅显示与父菜单项关联的价格标签。
我尝试了视图关系和参数的各种组合,除了在父页面上获得正确的价格标签而不是在子页面上获得正确的价格标签之外,没有运气。我还尝试将价格标签节点添加为父节点的子节点,并使用节点层次结构模块提供给视图的“父节点 ID”参数。
我的结构是错误的还是我缺少一些设置?
I'm building a Drupal website that has a simple hierarchical structure created using the Node Hierarchy module:
-Personal Training
-Boot Camps
--Locations
--Instructors
Each parent menu item has at least two 'price tag' nodes associated with it (through a node reference CCK field). I'm trying to create a views block that shows on all parent and child pages but only shows the price tags associated with the parent menu item.
I've tried various combinations of views relationships and arguments with no luck other than getting the correct price tags on the parent pages but not on their children. I've also tried adding the price tag nodes as children of the parent node and using the 'Parent node ID' argument supplied to views by the Node Hierarchy Module.
Am I structuring things wrong or is there some setting I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了将来的参考,我最终不得不添加一个节点引用到我想要显示价格标签的所有页面,而不仅仅是父页面。在某些方面,这提供了更大的灵活性,但它并不像只需要引用父节点那么“好”。
For future reference I ended up having to add a node reference to all the pages I wanted to show the price tags on rather than just the parent. In some ways this gives more flexibility but it's not as 'nice' as only having to reference the parent node.