Book Image

Drupal Multimedia

Book Image

Drupal Multimedia

Overview of this book

Table of Contents (16 chapters)

Node Referenced Files


The Node Reference module, distributed with the CCK, allows the creation of a field that references another node. Although it may not be initially obvious how this could help us with our need for file management, it can actually be used as a powerful and simple solution.

If we think of some of the node types we've created throughout this book as wrappers for our media, this solution should become clearer. For instance, we could use a Node Reference to manage Audio nodes, allowing audio clips to be easily associated with articles.

To illustrate how this can be used, we'll pretend that our client The Hog Blog wants its articles to occasionally display videos, and have all posted videos available in a gallery.

To this end, we'll create a video type using the Embedded Media Field. We'll be able to create a simple view for the gallery page that simply displays all videos sorted by creation date. Then the Article content type will contain a node reference to our video.

You...