Drupal 视图关系
我遇到以下问题:
我创建了内容类型“电影”和内容类型“演员”。我添加了对链接到电影的“演员”的节点引用。当我创建新的演员内容时,我可以从节点引用中选择电影。因此,我在视图中创建了一个列表,其中显示演员列表,并在演员旁边显示他们所在的电影之一。我通过“演员”中的节点引用来完成此操作。
好吧,问题就在这里。我现在想在电影旁边创建一个电影和演员列表。我知道如果我在电影中创建另一个节点引用,并且每次创建电影内容时,我都需要选择附加到电影的演员,我就可以解决这个问题。有没有办法在不创建另一个节点引用的情况下完成我需要的操作。我想使用演员内部已有的节点引用,并根据为演员选择的电影显示演员。
有人可以帮我解决这个问题吗?我真的被困住了。
谢谢你, 托利
I have the following problem:
I created content type "movies" and content type "actors". I added a node reference to the "actors" which links to movies. When i create new actor content I'm able to select movie from node reference. So, I created a list inside Views which shows you a list of actors and next to the actor it displays one of the movies they were in. I did this through node reference in "actors".
Ok, so here is the problem. I now want to create a list of movies and actor next to the movie. I know I can solve this problem if I create another node reference inside movies and every time I create movie content I would need to select actors attached to the movie. Is there a way to do what I need without creating another node reference. I want to use already existing node reference inside actors and show actor depending on the movie selected for the actor.
Can some one please help me with this problem? Im really stuck.
Thank You,
Toliy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以安装 nodereferrer 模块来提供节点引用字段的对应项。它使节点引用可以在两个方向上访问,因此您可以执行此类操作。
You can install the nodereferrer module to provide a counterpart to the node reference fields. It makes node references accessible in both directions so you can do this sort of thing.
刚刚发现this,它处理双向关系。
Just found out about this, which handles bidirectional relations.
我在 相应的节点引用方面也取得了很大的成功
设置两个节点引用后,您可以使用简单的复选框来确保它们链接起来。
I've also had a lot of success with the Corresponding Node Reference
After you set up your two node references, you can use simple checkboxes to ensure that they are linked up.