Drupal: CCK

29
Drupal: CCK By J.J. Admire, Andrew Monk, and Tyler Jones.

description

Drupal: CCK. By J.J. Admire, Andrew Monk, and Tyler Jones. Overview. Learn what CCK is and why we need it. Learn a little about how to use CCK. Learn a little on how CCK works. What is CCK?. CCK stands for the Content Construction Kit. - PowerPoint PPT Presentation

Transcript of Drupal: CCK

Page 1: Drupal: CCK

Drupal: CCK

By J.J. Admire, Andrew Monk, and Tyler Jones.

Page 2: Drupal: CCK

Overview

• Learn what CCK is and why we need it.• Learn a little about how to use CCK.• Learn a little on how CCK works.

Page 3: Drupal: CCK

What is CCK?

• CCK stands for the Content Construction Kit.• A module installed into Drupal (not a part of

the Drupal 6 Core).• Allows creation and organization of new fields

into content types.

From Content Creation Kit Handbook

Page 4: Drupal: CCK

Why do we need CCK?

• New fields in a content type can improve workflow.

From CCK Handbook and“CCK Module Basics”

Add fields to make sure people don’t forget to post information Require the data in the field to be a specific type. Require that a field be filled out. Relocate where the field shows up in the form. Group fields together.

Page 5: Drupal: CCK

Page before fields added.

Page 6: Drupal: CCK

Page after fields added.

Page 7: Drupal: CCK

Why do we need CCK?

• New fields can improve organization of information.

From CCK Handbook and“CCK Module Basics”

Makes information easier to find. Makes the information easier to search and extract.

Page 8: Drupal: CCK

Why do we need CCK?

• Adds a lot more flexibility to Drupal.

From CCK Handbook and“CCK Module Basics”

Lets you make specific forms for the information you want. Lets you add or delete specific fields easily. Gives you more flexibility with other modules.

Page 9: Drupal: CCK

Page after fields deleted.

Page 10: Drupal: CCK

What does CCK come with?

• Allows the admin create and organize new field types through the browser interface.

• Lets the admin set the type of data to be stored by the field, and the widget to be used to collect the data.

• Allows the admin to set how and when a field is displayed.

• Lets the admin set field level permissions.• Lets the admin import/export fields.• Allows PHP code to get default values and/or allowed

values for fields.From CCK Handbook and“CCK Module Basics”

Page 11: Drupal: CCK

Types that come with CCK core.

Field Types (Data to be stored)

• Text• Decimal• Float• Integer• Node Reference• User Reference

Widget Types (Used to collect info from user)

• Text field• Select list• Checkboxes/Radio buttons• Single on/off checkbox• Text Area (for text input)• Autocomplete text field (for

Node or User Reference input)

From “What is the Content Construction Kit? A View from the Database.” and “CCK ModuleBasics”

Page 12: Drupal: CCK

Page with a select list.

Page 13: Drupal: CCK

Sources:

• Douglas, Robert. “What is the Content Construction Kit? A View from the Database.” Lullabot.com

• learnbythedrop. “CCK Module Basics.” learnbythedrop.com

• Content Construction Kit Handbook. drupal.org

Page 14: Drupal: CCK

Installing Content Creation Kit

● Download at● http://drupal.org/project/cck● Extract the CCK file to:● drupal-6.17/sites/all/modules

Page 15: Drupal: CCK

Activating CCKAdministrator → Modules

Page 16: Drupal: CCK

CCK is a group of modules. The “Core CCK” modules are:

Page 17: Drupal: CCK

Adding Additional Fields For CCK

● The power of CCK is in the types of fields it allows you to add to content types.

● Many of the fields you would want to add to your content type must be downloaded and enabled separately.

● Download addition fields at:● http://drupal.org/project/modules

Page 18: Drupal: CCK

Add additional fields to same folder as CCK

sites/all/modules/

Page 19: Drupal: CCK

Adding fields to content types with CCK:

http://people.oregonstate.edu/~monka/Webpage/drupal-6.17/

Page 20: Drupal: CCK

• Initial DB before the CCK is activated

Page 21: Drupal: CCK

• DB after activating CCK and all of its sub-modules

cache_content 1content_group 0content_group_fields 0content_node_field 0content_node_field_instance05

Page 22: Drupal: CCK

• Adding a field to a single already created type

• cache_content 1• content_group 0• content_group_fields 0• content_node_field 1• content_node_field_instance 1• content_type_page 0• 6

Page 23: Drupal: CCK

• Adding the new field to another already created type

• cache_content 1• content_field_test_next 0• content_group 0• content_group_fields 0• content_node_field 1• content_node_field_instance 2• content_type_page 0• content_type_story 0• 8

Page 24: Drupal: CCK

• cache_content 1• content_field_test_next 0• content_group 0• content_group_fields 0• content_node_field 1• content_node_field_instance 2• content_type_page 0• content_type_story 0• 8

• Adding a new content type with no custom fields

Page 25: Drupal: CCK

• Adding the custom field to the custom type

• cache_content 2• content_field_test_next 0• content_group 0• content_group_fields 0• content_node_field 1• content_node_field_instance 3• content_type_page 0• content_type_story 0• content_type_test_type 0• 9

Page 26: Drupal: CCK

• Creating a page using the content type

• cache_content 4• content_field_test_next 1• content_group 0• content_group_fields 0• content_node_field 1• content_node_field_instance 3• content_type_page 0• content_type_story 0• content_type_test_type 1• 9

Page 27: Drupal: CCK

• Updating a pre-existing story page

• cache_content 3• content_field_test_next 2• content_group 0• content_group_fields 0• content_node_field 1• content_node_field_instance 3• content_type_page 0• content_type_story 1• content_type_test_type 1• 9

Page 28: Drupal: CCK

• Update the rest of the pre-existing pages

• cache_content 3• content_field_test_next 5• content_group 0• content_group_fields 0• content_node_field 1• content_node_field_instance 3• content_type_page 3• content_type_story 1• content_type_test_type 1• 9

Page 29: Drupal: CCK

Questions?