Community Documentation

Entity Reference Module guide for beginners

Last updated November 30, 2012. Created by lscook on November 1, 2011.
Edited by ibot, Amitaibu, joachim. Log in to edit this page.

The Entity Reference Module is a very useful module. It is easy to install and use with just a few steps. Download the recommended release at http://drupal.org/project/entityreference and install. You will also need to download and install Entity API http://drupal.org/project/entity and Chaos Tool Suite http://drupal.org/project/ctools. Enable all three modules.

Enabled Entity Reference Module

Enabled Chaos Tools

Create new content types with entity reference fields.

Entity Reference field

Comments

some background

I think explaining what makes this module useful will help users identify if they need/want to use it.
For a quick gloss on entities in Drupal 7 see http://drupal.org/node/1260680

This is great for the UI, but what about programming?

I dont seem to be able to find any good docs for how to write a custom node module that uses these fields. For example, I know how to make a custom d7 node module with basic fields, but how do I add these fields to my _mymodule_installed_fields and _mymodule_installed_instances functions arrays?
EDIT: This is the recommended way to replace nodereference fields from D6 in the D7 paradigm, so that might be the prefect programmatic example to include for other new D7 programmers.

Agree

I agree with you. I can't find documentation.
Can you advise something?

Page status

About this page

Drupal version
Drupal 7.x
Level
Beginner
Audience
Programmers, Site builders

Site Building Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.