Nodes, fields, and content types

Official documentation on these topics:
About nodes:
Working with Fields UI
Add a field to a content type
Rearrange the order of fields
Create a custom content type

The three parts of a CMS

In Drupal and in most other CMSs the foundational structure is comprised of three parts - content, users that interact with the content, and a set of rules (=permissions) on how this interaction is expected to unfold. All three are very important, but it all starts with content - content defines how the system will work, what users it will attract, and what these users will want to do with the content. So we will start our survey of Drupal with a thorough discussion of how content is organised.

Nodes and content types

The only way to organise things is to keep them separate and labeled. A rubbish dump is not organised; a library is. In a library, it is clear where one book ends and another begins. In a rubbish dump, it is not always clear where one piece of trash ends and the next begins.

A library may hold not only books, but periodicals, CDs, and DVDs as well - different kinds of stuff. Each one of them will be entered as a separate record in the catalog. To extend the library analogy to a CMS, a CMS like Drupal has different content types - blog entries, articles, pages, webforms, and so on - and each instance of a content type, each piece of content is called a node.


Each content types is built from fields. Let's say we have a CMS that drives a used CD store. We have created a special content type called "CD for sale". And let's say we have hired a part time worker to write descriptions of the item and this person comes up with the following.

This disc is Lady GAGA's album called Fame Monster. We want 8 bucks for it, but make us an offer. It looks brand new, but the notes booklet looks beat up - wrinkled and smells a bit weird.

This is neither here nor there. If we had a 1000 different CDs with descriptions like that, we can't really organise things using this information. We can't sort things by title or artist. We can't show just items that used vs. the ones that are new. And we can't show just the records that cost less than $10. So instead we break up the information into as many categories as possible:

Artist Name: Lady Gaga
CD Title: Fame Monster
Price: $8
Price negotiable (yes / no): yes
Item condition (new / used): used
Additional Notes: Water damage to the notes booklet

Now we have an organised record for a content type "CD for sale" with 6 different fields - artist name, CD title, price, negotiability, item condition, and additional notes. If we describe all our CDs this way, we can sort them easily. It comes at a price - it requires some thinking (what fields should we have?) and some careful data entry. Just like any plan to organise things, it is more painful in the short term (more work up front) but far less painful in the long term (saves a lot of work in the future).

Default Content Types in Drupal 7

Out of the box, Drupal comes with two content types - article and basic page. The idea is that the basic page type is for static stuff - the About Us page, Contact page, etc. The article type is for time-sensitive materials - news releases, stories, reports, etc. This is is why the basic page comes only with two fields (Title + Body), while article has four (thanks to the addition of keywords and image attachments).

Some modules will come with their own content types. There are two modules like that in the Drupal core: Blog and Book. If you enable the Blog module, you get a new content type called blog entry. If you enable the Book module, you get the book page content type. Books allow you to organise content into sequences with easy next / previous navigation, like pages or chapters in a book.

Custom Content Types

So you get two default content types (basic page + article); enabling two modules gives you another two content types (blog entry + book page). That's four choices - a lot better than one, but quite limiting if you have specific needs. Luckily, Drupal allows you to create custom content types just for your needs. You can use existing fields (such as title, body, keywords, etc) or create new fields. Custom content types make Drupal extremely flexible and easy to customise.

*Historical Note
The ability to create custom content types became part of the Drupal core only in version 7. In previous versions, the same functionality was achieved by a third-party module called Content Creation Kit (known as CCK, In Drupal 7, a re-worked version of CCK became an integral part of the core.