Drupal CCK and Views - Simplified

We're on the cusp of the release of Drupal 6.0, and that will be a happy day for all of us, as there are a number of improvements to the core functionality, and enhancements to the Drupal API. Unfortunately, it seems that two of the key contributed modules (in my book) are going to be a little behind the core 6.0 release. These would be CCK and Views. To me, the easiest way around this is to continue to use 5.x until at least these two modules 'catch up'.

Why are these so important to me? Well, very simply, CCK and Views allow you to tailor your content types, and display thereof, in any fashion you wish. If you're familiar with databases, and basic database concepts, adding CCK to your Drupal install allows you to customize tables, while Views lets you customize queries. The 'view' term comes from the database world, where a query can be saved as a "view" into a table, or number of tables. Both of these modules have a number of add-ons that further enhance their functionality.

Let's say that I want to create a newspaper site with a bunch of articles. In order for this to be useful, I would have to define the various pieces of the article. An article would typically include: a headline, the text of the article, an author attribution, and perhaps an originally-published date. One can easily add a new content type using the core modules that Drupal comes with, but that content type can only have a "Title" and a "Body". We would probably rename "Title" to "Headline", but this leaves us no place to put the other fields of interest. This is where CCK comes in. Adding CCK, and the contributed 'Date' module allow you to add these additional fields.

Views will further allow you to break down sections of your site. Let's say we add a "category" taxonomy (not covered here) that has values such as "Sports", "Entertainment" and "Politics". We associate this with our new Article content type, and are then able to create a view (or multiple views) that filters on content that is tagged with a specific section.

If you're going to use Drupal, my suggestion would be to understand how these two modules work, and how they work together. Not only will this enable you to enhance your Drupal site, but it will also give you some insight into how Drupal is easily-extended and enhanced by other modules.