HandsOn Job Content Type

In order to build this site, we'll need to go beyond the default Page and Story content types offered by Drupal core. This section will cover how to add your own custom content type, as well as add custom fields to it with CCK.

The Job content type will contain all the information we need to store about a particular position that's available at Epic University. It will need the following fields:

• Job Title (the normal node title)

• Description (the normal node body)

• Department (a text select field)

• Contact (a user reference field)

Let's walk through the steps to create this new content type:

1. Start by visiting the main content type settings page under AdministersContent managements-Content types (admin/content/types). Click the "Add content type" tab at the top of the page (admin/content/types/add).

2. Using the settings indicated in Table 3-3, create a new content type called Job. We repurpose the Title and Body fields for Job title and Description, respectively, simply by changing their labels. Be sure to expand the fieldset for "Submission form settings" to enter the title and body field labels. When completed, your screen should look similar to Figure 3-7.

Table 3-3. Settings for the Job content type Field Value

Identification Name Job

Type job

Was this article helpful?

0 0

Post a comment