Presentation on theming available online

Submitted by Marc on Fri, 12/17/2010 - 5:13pm

I have created a site at that delivers a reasonably complete presentation on theming. It even includes a small custom module that illustrates how to create a themable function and a theme that overrides that function.

You may register on the site to view the presentation in your choice of four different themes: Garland, a garland sub-theme, an Andreas03 sub-theme, and a Fusion sub-theme. The Fusion sub-theme implements the theme function override.

What are template files and suggestions?

Submitted by Marc on Wed, 09/22/2010 - 10:59pm

Template files are what Drupal uses to determine how to render the HTML for a page. When you wish to create a custom theme, there are several files you will likely include in your theme's directory:

  • page.tpl.php - this controls the overall look and feel of your site (slight change for Drupal 7). For those of you who have coded sites with HTML (and CSS), this is like the index.html page you created.
  • node.tpl.php - this controls how a node is built

Intro to creating a custom theme

Submitted by Marc on Wed, 09/22/2010 - 10:34pm

There is only one file you must create in order to define your first custom theme: the ".info" file. Create a new subdirectory somewhere under your "sites" directory. For instance, try creating the subdirectory sites/all/themes/mycustomtheme. Inside that subdirectory you can create Note that you do not have to use the same name for the .info file, but it is common practice just to keep things logical.