Book Image

Drupal 7 Themes

By : Ric Shreves
Book Image

Drupal 7 Themes

By: Ric Shreves

Overview of this book

<p>Drupal is an award winning open source Content Management System (CMS). Based on PHP and MySQL, its power and flexibility combined with its exceptional design mean it is one of the most popular choices for creating a CMS website.</p> <p>Drupal employs a specialized templating system and supports themes, which allow you to change the look and feel of your system's front and back-end interfaces.</p> <p><em>Drupal 7 Themes</em> is an ideal introduction to theming with Drupal 7. If you want to create a striking new look for your Drupal 7 website, this book is for you. This book is a revised, updated and expanded edition of Drupal 6 Themes, rewritten specifically for Drupal 7.</p> <p>This book will show you techniques and tools to help you improve the look and feel of any Drupal 7-powered website. 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.</p>
Table of Contents (17 chapters)
Drupal 7 Themes
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Identifying Templates, Stylesheets, and Themable Functions

Modifying forms


There are six different techniques used to modify the appearance of Drupal forms. Depending on the circumstances, you can:

  1. 1. Work with the existing CSS styling.

  2. 2. Modify the page or block holding the form.

  3. 3. Override a default template associated with the form.

  4. 4. Override a theme function related to the form.

  5. 5. Convert the function that generates the form into a template.

  6. 6. Modify the form with a custom module.

Of those six techniques, the first two are the most limited, as they do not involve changing the form output by itself. The third technique, overriding the default template associated with the form, is useful, but limited by the fact that not all the forms are the subject of existing templates.

Of the six, the last three techniques are the most powerful as they deal with the form itself. Unfortunately, the last three techniques are also the most complex to implement. Each of the approaches is discussed in the following sections that follow.

Working with the CSS styling...