Create custom content type

Last modified: September 11, 2008 - 04:31

In this tutorial you will learn how to create a create a custom content type.

Before proceeding to create a custom content type, follow the instructions at http://drupal.org/getting-started/5/install-contrib/modules to install and configure the very popular user contibuted Content Construction Kit (CCK) module (http://drupal.org/project/cck).

We are going to create a simple press release content type.

  • Click Administer
  • Click Content Management
  • Click Content types
  • Click Add content type tab
  • Fill out the form as follows:
    • Name: Press Release
    • Type: press_release
    • Description: A press release has fields for title, city, and body.
    • Click Save content type to use the default Title and Body field labels.
  • Click Edit beside the Press Release content type
  • Click Add field tab
  • Fill out the form as follows:
    • Name: City
    • Field type: under Text, select Text Field
    • Click Create field
  • Accept the default Widget Settings and Data Settings by clicking Save Field Settings
  • Change the weight of the City field to -3 and click update

If you click on Create content, you should now see a Press Release option.

 
 

Drupal is a registered trademark of Dries Buytaert.