Home > Store

Drupal's Building Blocks, Rough Cuts: Quickly Building Web Sites with CCK, Views, and Panels

Rough Cuts

  • Available to Safari Subscribers
  • About Rough Cuts
  • Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.

Not for Sale

Description

  • Copyright 2009
  • Dimensions: 7 X 9
  • Pages: 430
  • Edition: 1st
  • Rough Cuts
  • ISBN-10: 0-321-62034-8
  • ISBN-13: 978-0-321-62034-7

This is the Rough Cut version of the printed book.

“Even if you’re already a seasoned Drupal user of CCK, Views, or Panels, I’ve no doubt that this book will provide you with several new techniques and methods for getting the most out of these extremely essential modules. It certainly has for me.”

Dries Buytaert, founder and project lead of Drupal, and CTO of Acquia 

With Drupal, Web professionals can create full-featured Web sites with just a few clicks. Drupal’s core is compact and well documented, but much of Drupal’s immense power lies elsewhere—in external modules. Drupal’s Building Blocks is an authoritative tutorial, reference, and cookbook for Drupal’s most valuable modules.

The authors are Drupal insiders who’ve spent years creating and supporting these modules—Earl Miles, developer of the Views and Panels modules, and Lynette Miles, Drupal documentation team member. They’ve brought together indispensable information you won’t find anywhere else, as well as extensive sample “recipe” code designed for easy adaptation and reuse. Learn how to

  • Use Content Construction Kit (CCK) to customize your data input forms around your needs
  • Improve site flexibility with Drupal’s node system
  • Add optional field types, including PHP-based fields
  • Customize themes to display data more attractively and legibly
  • Build powerful Views query displays
  • Integrate with SQL databases
  • Customize Views with relationships, arguments, and filters
  • Optimize query performance
  • Add custom styles with the Panels module
  • Maintain full control over sites as you deploy into production

This book will help you create more powerful, flexible, usable, and manageable Web sites—whether you’re a Web developer, designer, administrator, architect, or consultant.

The accompanying Web site contains all examples, code, and themes presented in this book.

Sample Content

Table of Contents

Foreword xvii

Preface xix

Acknowledgments xxiii

About the Authors xxiv

 

Part I: Content Construction Kit

 

Chapter 1: Introducing CCK and Nodes 3

The Node System 3

Quest for the Grail: How CCK Was Born 8

Getting Started with CCK 10

Creating a New Content Type 11

Summary 15

Chapter 2: Field Concepts 17

What You Should Know Before Creating Fields and Content Types 17

The Content Type Pages 17

Creating New Fields for Content 24

Putting the Parts Together 30

Summary 38

Chapter 3: Deeper into Fields 39

Choosing Field Types 39

Constraining Data with Widgets 43

Date Module 48

Computed Fields 51

Link and Email Fields 54

Highly Visual Media 55

Summary 57

Chapter 4: Themes and CCK 59

Theme Basics 59

CCK Specific Theming 62

Helper Modules 69

Summary 73

Chapter 5: CCK API 75

Using the CCK API 75

The Field Model 76

Widget Type Modules 85

Formatter Modules 87

Creating Field Instances Using Content Copy 91

Creating Field Instances with the CRUD API 91

Creating Data for CCK Fields 95

Miscellaneous Helper Functions 97

Summary 98

Part II: Views

 

Chapter 6: Relational Databases 101

Drupal, SQL, and the Emergence of Views 101

The Basics of Relational Databases 102

Filtering and Sorting 105

From SQL to Views to Human Language 107

Summary 108

Chapter 7: Creating Views 109

Views UI 109

Showing Your Views to the World: Creating Displays 131

Summary 136

Chapter 8: Arguments, Exposed Filters, and Relationships 137

Arguments 137

Exposed Filters 145

Relationships 148

Summary 151

Chapter 9: Theming Views 153

An Overview 153

Classes in Views 153

Template Files 156

Working with Templates 164

Summary 175

Chapter 10: Query Optimization 177

Balancing Development Time against CPU Time 177

Updates

Submit Errata

More Information