内容类型drupal 7的关系变量 [英] relations variable of content-type drupal 7
问题描述
我创建了一个名为 Customer 的内容类型.
I have created a content type called Customer.
我正在创建称为报告的其他内容.
I am creating other content called reports.
一个客户有多个报告.
如何在 content-type 报表中创建一个变量与 content-type customer 上的客户名称的关系?
How could create a variable in the content-type reports relations with the customer's name on content-type customer?
谢谢
推荐答案
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.
这篇关于内容类型drupal 7的关系变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!