Introduction to theming

Last modified: February 28, 2008 - 22:02

Drupal is known for its power and flexibility and it can be a daunting experience trying to understand how it all comes together. There are countless ways to solve theming problems but not all are recommended. Knowing the "Drupal way" can lead to minimized code bloat and easier maintenance. If you choose to break the rules and go your own path, knowing them first may lead to a greater chance of success.

This does not mean you must understand Drupal top to bottom in order to create your theme. You can dive in as deep as you need to get the job done, but the more complex your site's design, the better it is to understand more of what Drupal's theming system provides.

The aim of this handbook is to expose all parts of Drupal's theming layer. Some areas will be geared towards more technical users while others will be more basic. The information presented in the following pages will progress from a general overview all theme developers should be familiar with to the more specific, and at times, more technical explanations.

A few things you should be aware of before proceeding:

  • An understanding of xHTML and CSS.
  • JavaScript and jQuery if your theme needs scripting support.
  • The terminology used in Drupal.

Knowing PHP will be a requirement in some situations but it is possible to avoid it entirely with pure CSS based themes.

Depending on your goals for the theme, it can be a very simple or complex process. Drupal is very open-ended so carefully consider what you are trying to achieve. You should think about the requirements of the site first. It is a lot easier to design with specific requirements in mind than creating a general purpose theme.

If you ever get stuck on a problem, read the troubleshooting page, ask in the theming forum or on IRC @ #drupal-themes. See How to effectively use IRC for instructions.

 
 

Drupal is a registered trademark of Dries Buytaert.