Drupal Content Creation Kit


Drupal 4.7 has an amazing "Content Creation Kit" module available for it (apparently, the module drove much of the node redevelopment between 4.6 and 4.7). It lets you easily create new content types, on the fly, without touching any code. It provides a set of primitives, and you can assemble them however you want - even providing lists of acceptable entries.

This is similar to the Flexinode module that's been around for awhile now, but Flexinode was apparently a proof-of-concept hack that wasn't intended to be adopted as widely as it has been, and apparently has scalability issues. CCK is sort of like Flexinode, reloaded. There is even a migration path planned to help folks who are heavily invested in Flexinode to move forward to the "modern" way of doing things.

For a demo project I'm setting up, I just created a new "News Release" CCK content type, with the required "Title" field, a text "Abstract" field, a "More Info" URL, and a "Main Content" field. I could easily add "Release Date", "Agency" or any other News Release related fields. And, any releases created using the CCK content type would automatically have the appropriate fields and widgets provided.

CCK supports several types of fields:

  • date (text field)
  • node reference (select list or autocomplete field)
  • integer (free entry, select list, or checkboxes)
  • decimal (free entry, select list, or checkboxes)
  • text (free entry, select list, or checkboxes)
  • user reference (select list or autocomplete field)
  • web url (text field with URL validation)

When combined with the Views module, you can create pages listing these various CCK content types, displaying whichever fields are appropriate, and providing sorting/filtering tools as desired.

Want to create a Journal Article Review content type? Sure thing! Lesson plan? OK! "Learning Object" reference - maybe even approximating a LOM? Why not? With these primitives available via the web interface (no code required - or even allowed) you should be able to do literally anything... You can even clone/duplicate CCK content types, making it easy to tweak types without breaking existing content.

Seriously cool stuff. Semantically structured content types within Drupal. Kind of like Structured Blogging, but implemented within the structure of the CMS, rather than as a bolted-on xml parsing/generating utility. I'll be using this on a few projects...


See Also

comments powered by Disqus