Defines simple text field types.



Depends on: Content (enabled)

Required by Node Reference (enabled). User Reference [disabled)



Defines a field type for referencing a user from a node. Depends on: Content (enabled), Text (enabled). Option Widgets (enabled)

Custom Content Types

Now you will be able to create your own custom content types. Continuing with the example of an Article type, you would browse to Administer | Content management | Content types | Add content type (at/admin/content/types/add) and fill iri the appropriate fields on that page. After submitting you wouid have a new content type with a title and an optional body:

Content types List ^Jg^J^EE^S Fields

To create a new content type, enter the human-readable name, the machine-readable name, and all other relevant fields that are on this page, Once created, users of your site will be able to create posts that are instances of this content type,



The human-readable name of this content type. This text will be displayed as part of the list on the create content page. It is recommended that this name begin with a capital letter and contain only letters, numbers, and spaces. This name must be unique.


The machine-readable name of this content type. This text will be used for constructing the URL of the create content page for this content type. This name must contain only lowercase letters, numbers, and underscores. Underscores will be converted into hyphens when constructing the URL of the create content page. This name must be unique.


A brief description of this content typs. This text will be displaced as part of the list on the create content page.

D" Submission form settings & Workflow settings & Comment settings Save content type |


The strength of CCK is that it allows custom fields to be defined and added to the content types. Fields allow you to add any additional information to a type such as subtitles, images, and videos. Some basic fields, such as text and numbers, are included with the module. But others, such as images and files, reqmre additional contributed modules.

To add fields, you wii! need to click on the add field link next to the new type on the resulting page from our ongoing example:

Content types

Add content type Fields

Below is a list of all the content types on your site, All posts that exist on your site are instances of one of these content types.

Name Type Description

Article article

Page page


An article is the name of our new, custom content type In this fictitious example, we might ultimately place articles prominently on our front page, with a slide show of associated videos in the right sidebar But that's for later chapters..

A page, similar in form to a story, is a simple method for creating and displaying information that rarely changes, such as an "About us" section of a website. By default, a page entry does not allow visitor comments and is not featured on the site's initial home page.

edit edit add field add field manage fields manage fields delete delete

Story story

A story, similar in form to a page, is ideal for creating and displaying content that informs or engages website visitors. Press releases, site announcements, and informal blog-like entries may all be created with a story entry By default, a story entry is automatically featured on the site's initial home page, and provides the ability to post comments.

edit add field manage fields delete

» Add a new content type

In this example, that would luring yoti to /admin/content/nods-type/article/ add field). You'll name the field, seledt the type of field such as te:*t or linage, and submit tlie page to see the configuration page for tlie field Here you can further define things such as setting a maximum image resolution or allowed values. In this example, well izreate a text field named Subtitle

Create new field

field_ [subtitle

The machine-readable name of the field. This name cannot be changed later! The name will be prefixed with 'field_' and can include lowercase unaccented letters, numbers, and underscores. The length of the name, including the prefix, is limited to no more than 32

A human-readable name to be used as the label for this field in the^rt/c/e content type.



Field type:

The type of data you would like to store in the database with this field.

The resulting page contains sections that will affect the specific field Additionally because created fields can be shared among content types, you can fuit her define settings that will affect all similarly shared fLeids.

Home * Administer > Content management > Article


Edit Display fields Add field Add group

Created field Subtitle. Article basic information



Widget type:

| Text field

Change basic information | Article settings

These settings apply only to the Subtitle field as it appears in the Article content type.

i> Default value

Display in group:

Select a group, in which the field will be displayed on the editing form.

Help text:

Instructions to present to the user below this field on the editing form.

Allowed HTML tags: <a> <b> <big> <code> <del> <em> <i> <ins> <pre> <q> <small>

<span> <strong> <sub> <sup> <tt> <oi> <ul> <li> <p> <br>

Global settings

These settings apply to the Subtitle field in every content type in which it appears.

Required Number of values:

Select a specific number of values for this field, or 'Unlimited' to provide an 'Add more' button so the users can add as many values as they like.

Warning! Changing this setting after data has been created could result in the loss of data!

Text processing:

f Plain text

F Filtered text (user selects input format) Maximum length:

The maximum length of the field in characters. Leave blank for an unlimited size.

i> Allowed values Save field settings |_

Once a field has been created, you may change the order of its display by dragging the icon to the left of the field on the resulting page, which you can also find by browsing to Administer | Content management | Article | Manage fields (at adniin/content/node-type/article /fields):


Edit Display fields Add field Add group

Control the order of fields in the input form,

To change the order of a field, grab a drag-and-drop handle under the Label column and drag the field to a new location in the list, (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the Save button at the bottom of the page.

Label Name Type Operations


4* Subtitle* field_subtltle text Configure Remove


* Changes made In this table will not be saved until the form is submitted.

User Permissions

We can define permissions for our users, who can be grouped by roles. For instance, we might have an edit role, whose users are able to create article content. First, we'll define a new role by gomg to Administer | User management | Roles


Roles allow you to fine tune the security and administration of Drupal, A role defines a group of users that have certain privileges as defined in user permissions. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on, In this area you will define the rote names of the various roles, To delete a role choose "edit".

By default, Drupal comes with two user roles:

° Anonymous user: this role is used for users that don't have a user account or that are not authenticated, o Authenticated user: this role is automatically granted to all logged in users,

Name Operations

anonymous user


edit permissions

authenticated user


edit permissions


edit role

edit permissions

Make Money Writing

Make Money Writing

This Report Will Show You How To Make Money By Providing Writing Services To Other Internet Marketers. Learn how to make money by writing the right way. Grab your copy of this report now and learn. Why writing is a great way to earn money. How to compete with cheap writers, even if you charge a lot more money.

Get My Free Ebook

Post a comment