phptemplate

Drupal theme hacking - creating a sub-theme

In a previous blog post I introduced the basics of how Drupal themes work. Let's dig a bit deeper and create our own sub-theme. What you need, is a working Drupal environment and at least one custom theme installed in sites/all/themes. During this tutorial I will create a sub-theme for the Colourise theme. If you want to use a different starting theme, the explanation below should still apply (apart from the name of the parent theme).

Drupal theme hacking - the basics

So you have this Drupal theme project you're working on, and you wonder where to start. This blog post tries to assist you in this endeavor. It assumes you're working with the default template engine: PHPTemplate.

First, let's zoom into how Drupal processes a theme. Most theme related information is stored in files in the theme directory. Usually, the my_theme theme files will reside in sites/all/themes/my_theme. An overview of typical files you will encounter in the theme directory:

Syndicate content