«

»

Content Management with Drupal (part 1)

This article is the first in our serialization of several chapters from the Drupal 7 Bible. In this, the first installment in the series, we introduce the key concepts behind Drupal content management.
-ed

The word content is deceptively simple. And the idea of managing it can mean many different things to different organizations. Dealing with the subtleties that lie in wait is why we have content management systems.

In this chapter, I lay the foundation for a solid understanding of how Drupal’s content management internals work and how you can use the system to address your specific needs. I deal with the key concepts, look at managing content types, and then go into the details of daily content management tasks.

Understanding the Key Concepts

Drupal is a framework as much as it is a functional “out of the box” CMS. And before you can really learn to leverage the system’s power, you must understand the basic ideas around managing Drupal content. The following concepts lie at Drupal’s heart.

Content and nodes

Nearly all content items in your Drupal system are what in Drupal parlance we call nodes. With that said, we use the terms content items and nodes interchangeably in this book, as does the Drupal community. Don’t be confused by this; nodes are content items and content. These are just different words that mean the same thing.

You do encounter other forms of data inside Drupal—users, comments, blocks, and taxonomy terms are examples, but strictly speaking these things are not primary content in the system, because they are not based on the Node module. The Node module is one of the few core modules that comprise the Drupal foundation. This module is present in the Drupal admin system’s module list, but unlike other modules, it cannot be disabled.

Drupal is not an object-oriented system, but it may be useful to think about content in Drupal as inheriting its basic properties and behavior from the Node module.

Content types and fields

When you put content into Drupal, it is stored as a specific form of data known as a content type. You can think of a content type as a template for content. Each type in the system has a name and is further defined by associating sub-elements—called fields in Drupal parlance—with it. Articles, pages, and polls are examples of Drupal’s default content types.

Prior to Drupal 7, content-type extensibility was often augmented by the CCK contributed module. Much of the CCK functionality was moved into Drupal’s core during the Drupal 7 release coding. This functionality is now known as Drupal Fields.

The standard Drupal 7 release comes with two content types enabled: the article and the page. However, if you enable all of Drupal’s core modules, you see that there are six default content types. These content types differ in a few basic ways. For example, they all have unique names, and they all have a different combination of fields associated with them.

Importantly, you can go beyond the default content types; Drupal supports extensible content types. This notion of extensibility is extremely powerful; it means that you can extend Drupal by defining your own content types that fit your own model of content.

Later in this chapter, I review the default content types and then walk through the process of creating custom content types.

Content versus metadata

In the Web CMS context, the word content refers to the data that is presented to Web site visitors. Metadata, on the other hand, is data about this data, and usually it is less visible to the Web site visitor. If you find that about as clear as mud, then consider that an article’s title and body are part of the article’s content, but its system ID, its tags, the copyright details, and the author’s name are all part of its metadata.

Metadata is becoming increasingly important to Web site managers because it plays a significant role both inside the CMS and after content is published.

Versioning of content items

Drupal has the ability to preserve a history of all changes made to the content in the system. If your content types are configured this way, or if the author chooses, a copy of the content item is saved each time a change is made. Each copy is called a node revision.

Each node revision is a unique version of the content item stored persistently in your system. These versions provide you with a history of content changes and give you the ability to revert to a previous content version at a future date, if you deem this necessary.

Some organizations require that the CMS retain a history of content revisions. In others, it is just a question of sanity or insurance. Either way, it is wise for you to consider revision tracking when planning how you will manage content with Drupal.

To enrich the history of content changes, you can optionally include a comment each time you save a new node revision. In general, this is a wise practice, and with larger groups it quickly becomes essential for preserving a meaningful history.

Publish status and lifecycles

Each node of content in Drupal has a simple, binary publish status value where 1 equals published and 0 equals not published. Depending on the standard content options for a given content type, nodes of that type either are published or not published by default. You can configure the default publish status value for each content type. I cover that later in this chapter.

Content also tends to have a lifecycle. For example, when you publish a poll, you have the option to automatically deactivate it after a certain number of days. Your organization may have other requirements as well. For example, you may want a particular item to be visible on your homepage from next Monday to next Thursday.

You can probably imagine many forms of content lifecycles. The point is that part of managing content is planning and managing its lifecycle.

The standard Drupal release does not contain tools for managing content lifecycle. To implement content lifecycle rules, such as publishing content on certain dates or showing content on the homepage for a specific period of time, you most likely need to experiment with one or more contributed modules. The Rules module is a good example of a non-core module that is useful for these purposes. We discuss advanced content management practices and configurations in Chapter 14 of the Drupal 7 Bible.

Multilingual content

Multilingual content is content in your CMS that has one or more translations. For example, you might publish your organization’s press releases in English, German, and Spanish. When you create each new translation, it is associated with the original article (the English version, for example) via Drupal’s core multilingual content functionality, yet you also can manage it like an independent item of content.

When you enable multilingual content management in Drupal, a number of special admin tools become available in the admin system. With these tools, you can track and manage your translated content items.

//END of Part 1

 

the drupal 7 bibleThis article is the first in a series. The content in this article comes from Chapter 10 “Content Management with Drupal” of the Drupal 7 Bible (Wiley & Sons). The Drupal 7 Bible is authored by Ric Shreves & Brice Dunwoodie. The book provides a comprehensive look at building and maintaining a website using version 7 of the Drupal open source content management system. You can learn more by visiting the Drupal 7 Bible page on this website.

 

About the author

Ric Shreves

Ric is an author and consultant who specializes in open source content management systems and in digital marketing. He's one of the founding partners of water&stone (www.waterandstone.com). He's also the author of the Joomla! Bible, the Drupal 7 Bible, the Ubuntu Visual Blueprint and the Drupal Themes series.

Leave a Reply

Your email address will not be published. Required fields are marked *


− 6 = one

Notify me of followup comments via e-mail. You can also subscribe without commenting.