Referencing other nodes, users or other entities in your content is pretty straightforward in Drupal 7. All you need is to install the Entity Reference module and you are on your way.
This tutorial will show you how you can reference nodes in your content. In other words, how you can have a node which contains a field that will display a link to another node (or multiple nodes) of any Content Type. The use case for this functionality is very broad, so this tutorial will focus on an abstract example to get you started.
First, prepare your 2 Content Types. A main one (for this example called
Articles) and a referenced one (for this example called
Related). Next up, install the Entity Reference module and its dependencies (Entity API and CTools) if you haven’t already done so.
Once everything is enabled, go to
Structure – Content Types – Articles (or whatever your main Content Type is called) and add a new field of the type
Entity Reference. As a widget you can choose one depending on your actual purpose. I usually go with
autocomplete. Click Save and configure the new field.
Under Target Type select
Node (you have other choices there too, feel free to experiment) and under Target bundles, the Content Type(s) you want available for referencing, in my case
Related. Go through the rest of the configuration and Save.
Now, go to the
Manage Display tab of your Content Type, and make sure your new field is visible in any View Modes and position you want.
The result: from now on, when you create a new
Articles node, you can select in your
autocomplete widget (or whichever type you chose) a
Related node to reference. Of course you need to have had created nodes of the Content Type
Related in order for the
autocomplete widget to find them. Unleeeeess, you use the Inline Entity Form module - which makes life much easier.
And once the
Articles node has been created with the
Related node referenced, you should be able to see your new field with a link to the assigned
Related node. And you can also have these referenced nodes displayed in a block on the sidebar.
Hope this helps!