<< Efficiently Organize Your Google Adwords Campaign
Google Launches Social Search >>

Drupal Theming Tutorial for Developers, An Overview

Recently we had some requests asking for a video tutorial on how to create a drupal theme - here it is!  A "theme" for those of you who aren't familiar is a term used to describe the visual layer of a drupal based web site, and so I think it's important to understand the possibilities and power behind the design.

I had to split the tutorial video into two separate clips since youtube only allows 10 minutes per video.

What's in the videos?

Yep, just watch the below two videos and you will have a basic understanding of how the Drupal theming system works including:

  • Theme template (tpl) files and how to make basic changes to your site's theme
  • The all-mighty .info file for creating regions and controlling high level aspects of your theme
  • Basics of the drupal theme engine
  • How css files work within drupal themes
  • A quick intro to preprocess functions (template.php)

Part 1

 

Part 2

Drupal's Theming System = Power!

I must say that I've been developing for some years now and I've never run into a more flexible and beautifully architected theming system than what drupal has to offer.  Why?

Drupal's theme system is setup to be loosely coupled with

  • the drupal core - meaning that the core of drupal isn't specifically tied to working with any one type of template file, for example it's possible to have different template "engines" that allow you to work with different types of template files (PHP, smarty, etc.) that end up driving your visual layer 
  • core and third party modules - you could for example create a module that defines some data... then your theme which is totally independant of your module can intercept that data from the module and arrange it in it's own way to be displayed in the final output to the screen, very cool :)

Some things I don't cover in this video, but may at some point, include

  • a more in depth look at preprocess functions and the template.php file
  • working with the very flexible hook_theme function
  • how to customize your theme on a page-by-page basis

Want to know more about theming?

Try checking out the drupal 6 theme guide on drupal.org, some nice charts and more in-depth knowledge.  I also have a few articles on useful drupal modules.

Ok that's it for my drupal theme tutorial for now, theme away!

thank you

thank you very much, it's really hard to find a good tutorial which just shows, what somebody who's already familiar with php and css needs. you saved my day :)

Mike, we need more !!!!

Well done Mike ! You helped me grab what these .info, page.tpl.php and template.php do. I need more stuff like this to dive into the deep of Drupal.
Nice work. keep it up.
Cheers.

Thank you so much..!!

Thank you so much..!! Really Nice Work and Simple to understand..!!

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
So that we know you are human, please answer the following question:

Need SEO services or help growing your company's web presence?  Contact Best Rank now