drupal 7内容类型字段,它是视图的结果

drupal 7内容类型字段,它是视图的结果

问题描述:

Drupal 7: I am looking for a content type field that is generated from the result of a view.

Example: I have a courses content type and I have a course_outline content type. In the course_outline content type I would like to list all the existing courses available in the database as one of its fields.

Drupal 7:我正在寻找从视图结果生成的内容类型字段。 p>

示例:我有一个课程内容类型,我有一个course_outline内容类型。 在course_outline内容类型中,我想列出数据库中可用的所有现有课程作为其中一个字段。 p> div>

you will need to install Entity API module and Entity reference module.

You can check out Entity Reference Module guide for beginners to get started.

Hope this helps... Muhammad.

If you are looking for a field that you can add (through the GUI) to your content type to refer to a View, check out viewfield module

Viewfield provides a field that holds a reference to a View and renders it whenever the entity containing the field is displayed.

However, there are other ways of achieving what you want including using Entity References (as described in the other answer to this question) or you could also write your own module to insert the appropriate view when rendering the node.