You are previewing Drupal 7 Fields/CCK.
O'Reilly logo
Drupal 7 Fields/CCK

Book Description

"

Explore Drupal 7 fields/CCK and master their use

  • Step-by-step guide to building your own Drupal 7 website using the Drupal 7 fields system

  • Specifically written for Drupal 7 development and site building

  • In-depth coverage of theming fields in Drupal 7

  • Discover the new fields system from the database perspective

  • Packed with hands-on-examples, quizzes, and clear explanations along with plenty of screenshots for better understanding

In Detail

The Field module is a new core module in Drupal 7, and is the next generation of the legendary Drupal 6 CCK (Content Construction Kit) module. The CCK was a developer's best friend, used on any Drupal project of any size. Now, the Field module builds on the strength of the CCK module, bringing new features to Drupal 7.

The Field module allows custom data fields to be attached to Drupal entities (content nodes, users, taxonomy vocabularies, and so on) and takes care of storing, loading, editing, and rendering field data.

In Drupal 7, you can create content types and you can add fields to any content type. You can rearrange the order in which fields are displayed and you can specify the label position and format of the field. Unlike in earlier versions, you do not need to download a separate module to add fields to a content type.

Wouldn't you like to know more about how to use this important and interesting feature?

Drupal 7 Fields/CCK Beginner's Guide helps you to get started quickly and to get beyond the basics to take full advantage of the fields system. It covers the key features of Drupal 7 fields that will help you get your Drupal 7 website up and running with a step-by-step approach to building a Drupal 7 website with the new fields system.

Drupal 7 Fields/CCK Beginner's Guide will show you how to create custom content types and fields, add fields to comments and vocabularies, reuse the existing fields, create Boolean and list fields, set default values to fields, add term references to content types, add file fields and image fields, create custom image styles, format fields' display for different view modes, use contributed modules to enhance the fields system, configure field-level permissions using the field-level permission module, and also to theme fields using the new Drupal 7 theme system. You will also learn the ins and outs of the fields system from the database perspective.

This hands-on guide will teach you to build Drupal websites that get the most out of the Drupal 7 Field module's powerful features.

A step-by-step comprehensive guide to learning Drupal 7 fields from scratch while building a Drupal 7 website

"

Table of Contents

  1. Drupal 7 Fields/CCK
    1. Table of Contents
    2. Drupal 7 Fields/CCK
    3. Credits
    4. About the Author
    5. About the Reviewer
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Time for action – heading
        1. What just happened?
        2. Pop quiz – heading
        3. Have a go hero – heading
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
      8. Errata
      9. Piracy
      10. Questions
    8. 1. Nodes and Content types in Drupal 7
      1. The book example project
      2. A preview of the final project
      3. What is a content type?
      4. Default content types in Drupal 7 core
        1. The Basic page content type
        2. The Article content type
      5. Time for action – creating contents usingthe article content type
        1. What just happened?
        2. Pop quiz – understanding of the default content types
      6. Creating custom content types
        1. Creating the Cooking Tip content type
      7. Time for action – creating the Cooking Tip content types
        1. What just happened?
        2. Creating the Recipe content type
      8. Time for action – creating the Recipe content type
        1. What just happened?
        2. Pop quiz – creating content types
      9. Adding content using custom content types
        1. Adding content using the Cooking Tip content type
      10. Time for action – adding content using the Cooking Tip content type
        1. What just happened?
        2. Adding content using the Recipe content type
      11. Time for action – adding contents using the Recipe content type
        1. What just happened?
        2. Pop quiz – adding content using custom content types
        3. Have a go hero – creating more content using the custom content types
      12. Summary
    9. 2. Fields
      1. What is CCK?
      2. Fields in Drupal 7
        1. Enabling the Field module
      3. Time for action – enabling the Field module
        1. What just happened?
        2. Pop quiz – enabling the Field module
        3. Field, Field UI, and Field SQL storage modules
      4. Time for action – finding the Field UI
        1. What just happened?
        2. Pop quiz – finding the Field UI
        3. Field types and input widgets
      5. Time for action – finding the field types and input widgets in Field UI
        1. What just happened?
        2. Pop quiz – finding the field types and input widgets in Field UI
      6. Drupal 7 core default fields
        1. Drupal 7 core field related modules
          1. Number modules
          2. Text modules
          3. List modules
          4. Taxonomy modules
          5. Image modules
          6. File modules
      7. Adding fields to content types
        1. Adding text fields using the text module
      8. Time for action – adding Long text fields using the text module
        1. What just happened?
        2. Text fields
      9. Time for action – adding text fields using the text module
        1. What just happened?
        2. Pop quiz – adding text fields using the text module
      10. Rearranging the order of fields
        1. Rearranging the order of the Notes field
      11. Time for action – rearranging the order of the Notes field
        1. What just happened?
        2. Pop quiz – rearranging the order of fields
      12. Adding fields to comments
        1. Adding text fields to comments
      13. Time for action – adding a text field to comments
        1. What just happened?
        2. Pop quiz – adding text fields to comments
      14. Time for action – rearranging the order of the Email field
        1. What just happened?
        2. Pop quiz – rearranging the order of fields in comments
      15. Reusing existing fields
      16. Time for action – reusing the Notes field for the Recipe content type
        1. What just happened?
        2. Pop quiz – reusing fields in content types
      17. Time for action – reusing the Source field for the Recipe content type
        1. What just happened?
      18. Time for action – rearranging the order of the Notes field
        1. What just happened?
      19. Time for action – reusing the Email text field in the Recipe content type
        1. What just happened?
      20. Time for action – rearranging the order of the Email field
        1. What just happened?
        2. Pop quiz – reusing fields in content types
        3. Have a go hero – creating fields for content types and comments
      21. Summary
    10. 3. Multiple Value Fields
      1. Enabling multiple values
      2. Time for action – enabling multiple values
        1. What just happened?
        2. Pop quiz – multiple values in fields
      3. Adding Boolean fields
      4. Time for action – adding a Boolean field
        1. What just happened?
        2. Pop quiz – understanding the Boolean field
      5. Setting default values
      6. Time for action – setting default values
        1. What just happened?
        2. Pop quiz – setting default values
      7. Adding list fields
      8. Time for action – adding list fields
        1. What just happened?
        2. Pop quiz – adding list fields
      9. Multiple value widgets
        1. What just happened?
      10. Time for action – changing the number of the values
        1. What just happened?
      11. Time for action – checkboxes/radio buttons widget with multiple values
        1. What just happened?
        2. Pop quiz – understanding multiple value widgets
        3. Have a go hero – creating multiple value fields
      12. Summary
    11. 4. Taxonomy
      1. What is taxonomy?
      2. Creating vocabularies
      3. Time for action – creating the Cooking Tip Category vocabulary
        1. What just happened?
      4. Time for action – creating the Recipe Category vocabulary
        1. What just happened?
        2. Pop quiz – creating vocabularies
      5. Adding terms to vocabularies
      6. Time for action – adding terms to Cooking Tip Category
        1. What just happened?
        2. Pop quiz – adding terms to vocabularies
        3. Have a go hero – adding terms to Recipe Category
      7. Adding term references to content types
      8. Time for action – adding a term reference field to the Cooking Tip content type
        1. What just happened?
        2. Pop quiz – adding term references to content types
        3. Have a go hero – adding a term reference to the Recipe content type
      9. Categorizing content using taxonomy
      10. Time for action – categorizing Cooking Tip Content using taxonomy
        1. What just happened?
        2. Pop quiz – categorizing content using taxonomy
        3. Have a go hero – categorizing content using the Recipe Category vocabulary
      11. Adding fields to vocabularies
      12. Time for action – adding a field to the Cooking Tip Category vocabulary
        1. What just happened?
        2. Pop quiz – adding fields to vocabularies
        3. Have a go hero – creating fields for content types and comments
      13. Summary
    12. 5. File and Image Fields
      1. Adding and configuring file fields to content types
      2. Time for action – adding and configuring a file field to the Recipe content type
        1. What just happened?
        2. Pop quiz – adding and configuring file field settings
        3. Have a go hero – adding and configuring a file field to the Cooking Tip content type
      3. Using file fields
      4. Time for action – using the file field
        1. What just happened?
        2. Pop quiz – using the file field
        3. Have a go hero – adding a file field to the Cooking Tip content type
      5. Adding image fields to content types
      6. Time for action – adding an image field to the Recipe content type
        1. What just happened?
      7. Configuring image field settings
      8. Time for action – configuring an image field for the Recipe content type
        1. What just happened?
        2. Pop quiz – configuring image field settings
        3. Have a go hero – adding an image field to the Cooking Tip content type
      9. Creating custom image styles
      10. Time for action – creating a custom image style
        1. What just happened?
        2. Pop quiz – creating custom image styles
        3. Have a go hero – adding an image field to the Cooking Tip content type
      11. Summary
    13. 6. Managing Field Display
      1. Field display
      2. Time for action – a first look at the field display settings
        1. What just happened?
        2. Pop quiz – a first look at the field display settings
      3. Formatting field display in the Teaser view
      4. Time for action – formatting the Body field display in teaser view
        1. What just happened?
        2. Pop quiz – formatting field display in the Teaser
      5. Custom display settings
      6. Time for action – enabling the Full content view mode in custom display settings
        1. What just happened?
        2. Pop quiz – custom display settings
      7. Formatting the image field display on Full content
      8. Time for action – formatting the image field display on Full content
        1. What just happened?
        2. Pop quiz – formatting the image field display on Full content
      9. Formatting the comment field display
      10. Time for action – formatting the comment field display
        1. What just happened?
        2. Pop quiz – formatting comment field display
      11. Formatting the vocabulary field display
      12. Time for action – formatting the vocabulary field display
        1. What just happened?
        2. Pop quiz – formatting the vocabulary field display
        3. Have a go hero – adding an image field to the Cooking Tip content type
      13. Summary
    14. 7. Contributed Field Modules
      1. Drupal modules
      2. Contributed modules
      3. Finding modules
      4. Time for action – finding contributed field modules through the Drupal website
        1. What just happened?
      5. Time for action – finding contributed field modules through the drupalmodules.com website
        1. What just happened?
        2. Pop quiz – finding a contributed field module
      6. Installing and enabling contributed modules
      7. Time for action – installing a module
        1. What just happened?
      8. Time for action – installing a module using Update manager
        1. What just happened?
        2. Pop quiz – installing and enabling contributed modules
        3. Have a go hero – installing and enabling contributed modules
      9. Contributed field modules
        1. Email field module
        2. Link module
        3. Table field module
        4. Computed field module
        5. Content Templates (Contemplate) module
      10. Summary
    15. 8. Field Level Permissions
      1. Downloading the Field Permission module
      2. Time for action – downloading the Field Permission module
        1. What just happened?
      3. Installing and enabling the Field Permission module
      4. Time for action – installing and enabling the Field Permission module
        1. What just happened?
        2. Pop quiz – installing and enabling the Field Permission module
      5. Enabling field-level permissions
      6. Time for action – enabling field-level permissions
        1. What just happened?
        2. Pop quiz – enabling field-level permissions
      7. Configuring field-level permissions on the PERMISSIONS administration page
      8. Time for action – configuring field-level permissions on the PERMISSIONS administration page
        1. What just happened?
        2. Pop quiz – configuring field-level permissions on the PERMISSIONS administration page
      9. Field-level permission reports
      10. Time for action – the Field permissions report page
        1. What just happened?
        2. Pop quiz – the Field permissions report page
        3. Have a go hero – setting up field permission
      11. Summary
    16. 9. Theming Fields
      1. What is a theme?
      2. What is theming?
      3. How Drupal renders a webpage
      4. How to get started on theming
      5. Creating a Drupal theme
      6. Time for action – creating a Drupal theme by cloning the existing theme
        1. What just happened?
        2. Pop quiz – creating a Drupal theme by cloning the existing theme
      7. Overriding template files
      8. Time for action – creating a template file for the Recipe content type
        1. What just happened?
        2. Pop quiz – creating a template file for the Recipe content type
      9. Editing template files
      10. Time for action – editing a template file
        1. What just happened?
        2. Pop quiz – editing a template file
      11. Styling the page using CSS
      12. Time for action – styling the page using CSS
        1. What just happened?
        2. Pop quiz – styling the page using CSS
        3. Have a go hero – theming fields
      13. Summary
    17. 10. A Database Perspective of Fields
      1. Key elements in Fields
        1. Entities
        2. Bundles
        3. Field storages
        4. Field types
        5. Fields
        6. Field instances
        7. Field widgets
        8. Field formatters
        9. Fieldable entities
        10. Taxonomy
        11. Pop quiz – key elements in Fields
      2. New concepts in Drupal 7
        1. Understanding nodes in Drupal
        2. Turning everything into a node
        3. Is everything an entity?
        4. Entities are the new nodes?
        5. Are they entities or objects?
        6. Pop quiz – new concepts in Drupal 7
      3. A database perspective of fields
        1. Content types
      4. Time for action – creating a new content type
        1. What just happened?
        2. Pop quiz – creating a new content type
        3. Fields
        4. Field-related database tables
        5. Pop quiz – a database perspective of fields
        6. Have a go hero – monitoring value changes between fields and field database tables
      5. Summary
    18. A. Pop Quiz Answers
      1. Chapter 1, Nodes and Content types in Drupal 7
        1. Pop quiz – understanding the default content types
        2. Pop quiz – creating content types
        3. Pop quiz – adding content using custom content types
      2. Chapter 2, Fields
        1. Pop quiz – enabling the Field module
        2. Pop quiz – finding the Field UI
        3. Pop quiz – finding the field types and input widgets in Field UI
        4. Pop quiz – adding text fields using the text module
        5. Pop quiz – rearranging the order of fields
        6. Pop quiz – adding text fields to comments
        7. Pop quiz – rearranging the order of fields in comments
        8. Pop quiz – reusing fields in content types
        9. Pop quiz – reusing fields in content types
      3. Chapter 3, Multiple Value Fields
        1. Pop quiz – multiple values in fields
        2. Pop quiz – understanding the Boolean field
        3. Pop quiz – setting default values
        4. Pop quiz – adding list fields
        5. Pop quiz – understanding multiple value widgets
      4. Chapter 4, Taxonomy
        1. Pop quiz – creating vocabularies
        2. Pop quiz – adding terms to vocabularies
        3. Pop quiz – adding term references to content types
        4. Pop quiz – categorizing content using taxonomy
        5. Pop quiz – adding fields to vocabularies
      5. Chapter 5, File and Image Fields
        1. Pop quiz – adding and configuring file field settings
        2. Pop quiz – using the file field
        3. Pop quiz – configuring image field settings
        4. Pop quiz – creating custom image styles
      6. Chapter 6, Managing Field Display
        1. Pop quiz – a first look at the field display settings
        2. Pop quiz – formatting field display in the teaser
        3. Pop quiz – custom display settings
        4. Pop quiz – formatting image field display on Full content
        5. Pop quiz – formatting comment field display
        6. Pop quiz – formatting vocabulary field display
      7. Chapter 7, Contributed Field Modules
        1. Pop quiz – finding a contributed field module
        2. Pop quiz – installing and enabling contributed modules
      8. Chapter 8, Field Level Permissions
        1. Pop quiz – installing and enabling the Field Permission module
        2. Pop quiz – enabling field-level permissions
        3. Pop quiz – configuring field-level permissions on the PERMISSIONS administration page
        4. Pop quiz – the Field permissions report page
      9. Chapter 9, Theming Fields
        1. Pop quiz – creating a Drupal theme by cloning the existing theme
        2. Pop quiz – creating a template file for the Recipe content type
        3. Pop quiz – editing a template file
        4. Pop quiz – styling the page using CSS
      10. Chapter 10, A Database Perspective of Fields
        1. Pop quiz – key elements in Fields
        2. Pop quiz – new concepts in Drupal 7
        3. Pop quiz – creating a new content type
        4. Pop quiz – a database perspective of fields
    19. Index