Drupal 6 Theming Cookbook
上QQ阅读APP看书,第一时间看更新

Preface

Themes are among the most powerful and flexible features available when it comes to the presentation of a website. The greatest strength of Drupal lies in its design which, when done correctly, allows developers and designers to customize and micromanage each and every aspect of the site. Furthermore, the Drupal theming system and its APIs allow for the design of custom themes that are easy to administer and maintain.

This book provides a plethora of solutions that enable Drupal theme designers to make full use of all its features and its inherent extensibility to style their sites just the way they want to. It covers numerous aspects from using contributed and custom themes to leveraging the powerful CCK, Views, and Panels triad of modules to create rich designs that are easy to administer and maintain.

Structured as a collection of recipes to perform a wide variety of practical tasks, this book will systematically guide readers towards solutions that are central to Drupal theming. Each recipe is divided into the following sections:

  • An Introduction that explains what the recipe is about
  • Getting ready lists any prerequisite steps required for the recipe to work
  • How to do it describes how to implement the recipe
  • How it works explains how the recipe works
  • There's more catalogs useful information related to the recipe

While it is recommended that readers follow the recipes in each chapter in sequence, it is also possible to sift through the recipes at random. Special attention should always be paid to the Getting ready section of each recipe which provides information on preliminary steps that need to be performed, and in some cases, specify if the recipe builds on the result of earlier recipes in the same chapter.

What this book covers

Chapter 1, Drupal Theme Basics, introduces the reader to the basic elements of Drupal theming, such as downloading and installing a contributed theme, and learning how to add and customize blocks.

Chapter 2, Beyond the Basics, explains the concept of theme engines and sub-themes and briefly introduces the topic of template overrides. It also includes essentials recipes dealing with adding and optimizing CSS files.

Chapter 3, Custom Themes and Zen, focuses on starter themes, specifically Zen.

Chapter 4, Templating Basics, details how to customize page elements and content by overriding template files.

Chapter 5, Development and Debugging Tools, provides essential information on debugging and expediting development through the use of a number of tools.

Chapter 6, Advanced Templating, explores the PHPTemplate theme engine further and delves into using techniques such as variable manipulation and preprocess hooks to customize various theme elements.

Chapter 7, JavaScript in Themes, covers the use of JavaScript and jQuery in Drupal themes.

Chapter 8, Navigation, contains recipes which focus on theming navigational elements in a Drupal theme such as menus, breadcrumbs, pagers, and so on.

Chapter 9, Form Design, discusses the Drupal Forms API from a theming point of view.

Chapter 10, Customizing CCK, demonstrates how to theme CCK nodes and fields and also covers the use of customization of the ImageField and ImageCache modules, to display and style images to suit the theme.

Chapter 11, Views Theming, focuses on the Views module from a themer's perspective.

Chapter 12, Rapid Layouts with Panels, shows how to create complex layouts using the Panels module and demonstrates its use in conjunction with the CCK and Views modules.