Last updated 29 October 2015. Created on 8 May 2006.
Edited by ashish_nirmohi, ar-jan, amuraro, tsverdukdru. Log in to edit this page.

The Content Construction Kit allows you to add custom fields to custom content types using a web interface. In Drupal 5.x, custom content types can be created in Drupal core, and the Content Construction Kit allows you to add custom fields to any content type. In Drupal 7 and later, most of the functionality of CCK has been absorbed into Drupal core. For more information on fields in core, see Working with Fields (Drupal 7 and later)

Documentation and instructions are available in the separate CCK Handbook.

Summary and purpose of CCK?

Drupal comes with core content types like story and blog. For such a content type, go to 'Create content' and submit a new story or blog. That's sufficient for pages of pure text and with or without attachments.

But what if your users want to be able to submit reviews of their favorite aardvark? That would be a new content type, but I want to be able to display other stuff as well as a chunk of text for every node of that type, and I don't want it to be just attached file links.

My options: I could hack the story.module, OR I could see if someone has already created an aardvark.module for the exact type of content I want, OR using CCK I could create a new content type called Aardvark Review.

Using CCK, I can create a content type that has exactly the fields I need, no more or less. My Aardvark Review for instance might have:

  1. text field (comments on the aardvark)
  2. dropdown menu (aardvark color)
  3. audio file (recording of the aardvark's grunting)
  4. image (photo of aardvark)

The CCK admin interface for creating these new content types is nice and easy: just create your new type and then click through, adding the type of fields you want it to have and what their parameters will be (how much text for the review? which colors in the dropdown menu?). There are many add-ons available in the downloads section under CCK that add new kinds of fields to your options (video field, audio field, calculated values and vastly more complicated ones).

From the users' perspective, they'll just click on Create content > Aardvark Review and get a form that asks them to submit their review, the aardvark's color, a recording, and picture.

Looking for support? Visit the forums, or join #drupal-support in IRC.


voj’s picture

I'm Kinda new here but I would like to tell you that you(whoever who wrote this documentation) must not use unusual terms like Aardvark as an example in the documentation.
if someone tries to read it(like me), would be literally make the reader confuse on the unusual term.

At first I thought that Aardvark was a term in drupal or some geeky word. until I searched it. (it's some animal that burrows or something...)

I suggest that you(or anyone) must try to avoid using word that are not familiar.

kamiemd’s picture

I thought the same thing as ragnaewan until I saw "grunt" but maybe just a "(the animal) after the word aardvark would suffice.

jesse.ivy’s picture

I've been looking for an online ant eater for years ;)

OsamaBinLogin’s picture

well, I'm glad that at least the author chose a distinctive word that wasn't part of Drupal. Imagine if you look up "Aardvark" and somewhere there's an Aardvark drupal module and it does something that's hard to understand... you might go and install it thinking you need to do that, or at least go and waste time reading the documentation. Or if they'd used 'comment' or 'panel' instead - would be confusing.

maybe 'horse' would have been a better choice. Ragnaewan, you know what a Horse is?

voj’s picture

Of course, thank you. :)

by the time I was reading this again, I just realize it's a module.

Maybe(IMHO) they should have wrote Aardvark Module(note there's a "Module" word after Aardvark), they must always think that when writing a documentation it should target audience with 0 knowledge or if they don't want to they should have put some reference links, but you know what nevermind they would know that this is a module after reading comments. I was just confused that the title is all about CCK and content types and stuff but the subject was Aardvark [Module].

CodeMaster’s picture

Is there a way to normalize the content types to actual tables/cross tables with custom fields as strong typed fields?
The ability to add custom fields/relationships to content types is extremely powerful as you can image. Especially if you are developing back end system administrative tools. I've been bouncing the idea around my co-workers but the general feedback that I am getting is that it would be nice if the data was normalized for the obvious reasons such as processing business rules, reporting etc.