Drupal 视图 - 使用 CCK、NodeReference 和 Arguments 将 1 个节点关联到 N 个其他节点
我正在研究 Drupal 设置,并遇到了使用视图将节点关联在一起的小问题。
本质上我想要做的是在编辑节点 A 时,有一个多选节点引用字段来指示它与节点 B、C、D 相关。当我查看节点 A 的内容时,它应该显示相应的内容直接在节点 A 上查看每个节点。
我通过 本教程关于在视图中使用参数,但它似乎正在做与我想要的相反的事情。此方法要求我将节点 B、C 和 D 中的关系设置为指向节点 A,而不是让节点 A 指向节点 B、C 和 D。在 3 个不同的位置而不是 1 个位置设置关系似乎违反直觉,并且当我们开始将此方法应用于一堆不同的节点时,管理起来会很痛苦。
我为论证选择了以下选项:
// this is my multiple-select NodeReference relationship field
Content: Linked Highlight Boxes (field_linked_nodes)
Title: [blank]
Breadcrumb: [blank]
Action to take if argument is not present: Provide default argument
Default Argument Type: Node ID from URL
Validator: <Basic Validation>
Action to take if argument does not validate: Hide View / Page not found (404)
Wildcard: all
Wildcard title: All
Allow multiple terms per argument: checked
Exclude the argument: not checked
如果您需要更多信息或解释,请告诉我。任何帮助将不胜感激。
I am working on a Drupal setup and have run into a slight issue relating nodes together using Views.
Essentially what I want to be able to do, is while editing Node A, have a multiple select node reference field to indicate it is related to Nodes B, C, D. When I view the contents of Node A, it should display the appropriate view for each of those nodes directly on Node A.
I worked through This Tutorial on using arguments in views, but it seems to be doing things in reverse of what I want. This method requires me to set the relationships in Nodes B, C and D to point to Node A instead of having Node A point to Nodes B, C and D. Setting the relationship in 3 different places instead of 1 location seems counter-intuitive and will be a pain to manage when we start applying this method to a bunch of different nodes.
I selected the following options for the argument:
// this is my multiple-select NodeReference relationship field
Content: Linked Highlight Boxes (field_linked_nodes)
Title: [blank]
Breadcrumb: [blank]
Action to take if argument is not present: Provide default argument
Default Argument Type: Node ID from URL
Validator: <Basic Validation>
Action to take if argument does not validate: Hide View / Page not found (404)
Wildcard: all
Wildcard title: All
Allow multiple terms per argument: checked
Exclude the argument: not checked
Let me know if you need any more information or explanation. Any help will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将需要节点关系模块:http://drupal.org/project/noderelationships。这将为您提供您想要的背部关系。
Your are going to want the Node Relationships module: http://drupal.org/project/noderelationships. This will give you the back relationships that you want.