内容型钻石关系变量7 [英] relations variable of content-type drupal 7

查看:574
本文介绍了内容型钻石关系变量7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个名为Customer的内容类型。

I have created a content type called Customer.

我正在创建其他称为报告的内容。

I am creating other content called reports.

客户有几个报告。

如何在内容类型报告中创建与内容类型客户的客户名称关系的变量?

How could create a variable in the content-type reports relations with the customer's name on content-type customer?

谢谢

推荐答案

你应该使用 Drupal Entity Reference 模块。下载,安装和启用它,然后,您必须在内容类型报告中添加一个新的字段,即客户,类型为实体引用(此实体类型由实体参考模块添加)。添加此字段后,您必须选择可以引用哪种类型的节点。在复选框列表中选择客户。

You should use Drupal Entity Reference module. Download, install and enable it, and then, you have to add a new field in content type "Reports", namely customer, of type "Entity reference" (this field type was added by Entity Reference module). Once you have added this field, you have to choose which kind of nodes can be referenced. Select Customer in the checkbox list.

您还可以选择要确定哪位客户拥有报表的方式。您有几个选项:选择复选框,自动填充字段等。花一点时间确定报告是否应链接到一个或多个客户。如果它必须链接到单个客户,请确保将字段数限制为一个。

You can also choose the way you want to determine which customer owns a report. You have several options: selection checkboxes, autocomplete field, etc. Take a second to determine if a Report should be linked to one or more customers. In case it must be linked to a single customer, make sure to limit the number of fields to one.

使用此模块,您不仅将客户的名称链接到报告,但您也将链接整个实体。您可以将客户名称显示为客户节点的链接。

Using this module you will not only link the customer's name to the report, but you will also link the whole entity. You will be able to display the customer name as a link to the customer node.

这篇关于内容型钻石关系变量7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆