Free Sample
+ Collection

Drupal 7 Fields/CCK Beginner's Guide

Beginner's Guide
Dave Poon

Explore Drupal 7 fields/CCK and master their use
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook

Want this title & more?

$16.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849514781
Paperback288 pages

About This Book

  • 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

Who This Book Is For

This book is designed primarily for people who know some basics of Drupal and want to familiarize themselves with CCK/Field. However, technical users will also find the book useful, as we will explore a wide variety of techniques that are used to build websites with fields.

Table of Contents

Chapter 1: Nodes and Content types in Drupal 7
The book example project
A preview of the final project
What is a content type?
Default content types in Drupal 7 core
Time for action – creating contents usingthe article content type
Creating custom content types
Time for action – creating the Cooking Tip content types
Time for action – creating the Recipe content type
Adding content using custom content types
Time for action – adding content using the Cooking Tip content type
Time for action – adding contents using the Recipe content type
Summary
Chapter 2: Fields
What is CCK?
Fields in Drupal 7
Time for action – enabling the Field module
Time for action – finding the Field UI
Time for action – finding the field types and input widgets in Field UI
Drupal 7 core default fields
Adding fields to content types
Time for action – adding Long text fields using the text module
Time for action – adding text fields using the text module
Rearranging the order of fields
Time for action – rearranging the order of the Notes field
Adding fields to comments
Time for action – adding a text field to comments
Time for action – rearranging the order of the Email field
Reusing existing fields
Time for action – reusing the Notes field for the Recipe content type
Time for action – reusing the Source field for the Recipe content type
Time for action – rearranging the order of the Notes field
Time for action – reusing the Email text field in the Recipe content type
Time for action – rearranging the order of the Email field
Summary
Chapter 3: Multiple Value Fields
Enabling multiple values
Time for action – enabling multiple values
Adding Boolean fields
Time for action – adding a Boolean field
Setting default values
Time for action – setting default values
Adding list fields
Time for action – adding list fields
Multiple value widgets
Time for action – changing the number of the values
Time for action – checkboxes/radio buttons widget with multiple values
Summary
Chapter 4: Taxonomy
What is taxonomy?
Creating vocabularies
Time for action – creating the Cooking Tip Category vocabulary
Time for action – creating the Recipe Category vocabulary
Adding terms to vocabularies
Time for action – adding terms to Cooking Tip Category
Adding term references to content types
Time for action – adding a term reference field to the Cooking Tip content type
Categorizing content using taxonomy
Time for action – categorizing Cooking Tip Content using taxonomy
Adding fields to vocabularies
Time for action – adding a field to the Cooking Tip Category vocabulary
Summary
Chapter 5: File and Image Fields
Adding and configuring file fields to content types
Time for action – adding and configuring a file field to the Recipe content type
Using file fields
Time for action – using the file field
Adding image fields to content types
Time for action – adding an image field to the Recipe content type
Configuring image field settings
Time for action – configuring an image field for the Recipe content type
Creating custom image styles
Time for action – creating a custom image style
Summary
Chapter 6: Managing Field Display
Field display
Time for action – a first look at the field display settings
Formatting field display in the Teaser view
Time for action – formatting the Body field display in teaser view
Custom display settings
Time for action – enabling the Full content view mode in custom display settings
Formatting the image field display on Full content
Time for action – formatting the image field display on Full content
Formatting the comment field display
Time for action – formatting the comment field display
Formatting the vocabulary field display
Time for action – formatting the vocabulary field display
Summary
Chapter 7: Contributed Field Modules
Drupal modules
Contributed modules
Finding modules
Time for action – finding contributed field modules through the Drupal website
Time for action – finding contributed field modules through the drupalmodules.com website
Installing and enabling contributed modules
Time for action – installing a module
Time for action – installing a module using Update manager
Contributed field modules
Summary
Chapter 8: Field Level Permissions
Downloading the Field Permission module
Time for action – downloading the Field Permission module
Installing and enabling the Field Permission module
Time for action – installing and enabling the Field Permission module
Enabling field-level permissions
Time for action – enabling field-level permissions
Configuring field-level permissions on the PERMISSIONS administration page
Time for action – configuring field-level permissions on the PERMISSIONS administration page
Field-level permission reports
Time for action – the Field permissions report page
Summary
Chapter 9: Theming Fields
What is a theme?
What is theming?
How Drupal renders a webpage
How to get started on theming
Creating a Drupal theme
Time for action – creating a Drupal theme by cloning the existing theme
Overriding template files
Time for action – creating a template file for the Recipe content type
Editing template files
Time for action – editing a template file
Styling the page using CSS
Time for action – styling the page using CSS
Summary
Chapter 10: A Database Perspective of Fields
Key elements in Fields
New concepts in Drupal 7
A database perspective of fields
Time for action – creating a new content type
Summary

What You Will Learn

  • Customize web content by creating custom content types and fields through the Field's user interface
  • Enrich website functionality by adding fields to content types, comments, and vocabularies
  • Explore the interaction between multiple-value fields and multiple-value widgets
  • Create multiple value fields with Boolean and list field types
  • Categorize web content with term-reference fields for your website
  • Add file attachment ability to your Drupal site with file fields
  • Adjust and configure image effects with image styles for your website
  • Display and configure images with image fields
  • Manage field display on teaser, full-content, and RSS views for your website
  • Add and work with contributed modules to enhance field functionality
  • Theme and lay out fields using CSS and the Drupal 7 theme system on your website
  • Discover fields behind-the-scenes from the database perspective

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.

Authors

Read More