1 / 29

Drupal: CCK

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.

adie
Download Presentation

Drupal: CCK

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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.

  3. 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

  4. Why do we need CCK? • New fields in a content type can improve workflow. • 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. From CCK Handbook and “CCK Module Basics”

  5. Page before fields added.

  6. Page after fields added.

  7. Why do we need CCK? • New fields can improve organization of information. • Makes information easier to find. • Makes the information easier to search and extract. From CCK Handbook and “CCK Module Basics”

  8. Why do we need CCK? • Adds a lot more flexibility to Drupal. • 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. From CCK Handbook and “CCK Module Basics”

  9. Page after fields deleted.

  10. 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”

  11. Types that come with CCK core. Field Types (Data to be stored) 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) • Text • Decimal • Float • Integer • Node Reference • User Reference From “What is the Content Construction Kit? A View from the Database.” and “CCK ModuleBasics”

  12. Page with a select list.

  13. 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

  14. Installing Content Creation Kit Download at http://drupal.org/project/cck Extract the CCK file to: drupal-6.17/sites/all/modules

  15. Activating CCKAdministrator → Modules

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

  17. 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

  18. Add additional fields to same folder as CCKsites/all/modules/

  19. Adding fields to content types with CCK: http://people.oregonstate.edu/~monka/Webpage/drupal-6.17/

  20. Initial DB before the CCK is activated

  21. DB after activating CCK and all of its sub-modules cache_content 1 content_group 0 content_group_fields 0 content_node_field 0 content_node_field_instance 0 5

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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

  28. 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

  29. Questions?

More Related