Book Image

Drupal 6 Themes

By : Ric Shreves
Book Image

Drupal 6 Themes

By: Ric Shreves

Overview of this book

<p>Drupal is an award winning open source Content Management System (CMS). Based on PHP/MySQL, its power and flexibility combined with its exceptional design mean it is one of the most popular choices for creating a CMS website.<br /><br />Drupal employs a specialized templating system and supports themes, which allow you to change the look and feel of the system's front and back-end interfaces. <br /><br />Drupal 6 Themes is an ideal introduction to theming with Drupal 6. If you want to create a striking new look for your Drupal 6 website, this book is for you. This book is a revised, updated and expanded edition of Drupal 5 Themes, written specifically for Drupal 6. The book will show you techniques and tools to help you improve the look and feel of any Drupal 6-powered website<br /><br />Starting from the basics of theme setup and configuration, you will learn about the Drupal theming architecture and the PHPTemplate engine, and then move on to modifying existing themes and building new themes from scratch. You will find out about tools to make your theme development easier, and also find invaluable information about under-documented elements of the theming system.</p>
Table of Contents (16 chapters)
Drupal 6 Themes
Credits
About the Author
About the Reviewers
Preface

Solutions to Common Form Issues


Following are the solutions to some of the common form issues:

Modifying Data Labels and Other Text

One of the most commonly requested form modifications is the ability to change the data labels and the explanatory text built into the default forms. There are several alternative ways to modify the text elements. The choice of which technique to apply depends largely on the number, and extent of the changes you wish to make.

Using form_alter()

As we saw earlier in this chapter, you can create a custom module and use the function form_alter to make changes to one or more forms. This approach is very useful where you want to make changes across several forms or if you wish to combine text changes with more extreme form modifications (for example, adding or deleting fields). However, if your goal is simply to insert new text not related to a specific field, or if you wish to modify only one form, you are probably better served by one of the other approaches outlined...