[support] Beginners guide to creating themes

Tina Callahan tina.callahan at UDel.Edu
Sat Sep 12 12:05:14 UTC 2009


If you are new to Drupal theming, my suggestion is to actually customize 
a theme first rather than start a theme from scratch.  While there are 
lots of great resources out there, the newbie themer is much better off 
modifying a theme that has all of the critical pieces.  After you've 
done this a few times (maybe more than a few), then it is much easier to 
create a theme from scratch.

A while back I tried demonstrating to a bunch of designers the 
simplicity of building a theme from scratch and it got hairy pretty quick. 

    * The first thing you should learn is about theme requirements (what
      files are required for a basic theme, what are the naming
      conventions, etc.).
    * Then you will have to know the Drupal template variables and the
      concept of regions and blocks.
    * Assuming that you know CSS, these will put you in good shape. 
      However, you will also need to theme items that the basic HTML web
      designer doesn't know about: Drupal messages and errors, tabs,
      etc.  If you don't add these variables to your template you won't
      be able to do simple things like switch between view and edit or
      see other messages that Drupal sends to the screen.
    * Then, you can begin getting more complex if you want to build new
      areas that function differently on different pages or if you want
      to let the user customize the theme via the browser, also known as
      configuring features.


So - with all of that said, I do like 
http://tips.webdesign10.com/how-to-make-a-drupal-theme.  This was 
created a while ago, but I believe has been updated.  This is very 
helpful.  It was a good way to get introduced to the basics of the theme 
without having to know the finer grain details.  I also heeded advise to 
use Zen (http://drupal.org/project/zen) as a starting theme, but easily 
got lost when I first started theming.  It is documented well with 
comments throughout the code, but is is a complex maze to a newbie.  
Since then, there are a few great "streamlined" themes out there that 
are good to start with.  I like to go with SuperClean 
(http://drupal.org/project/superclean) and Clean 
(http://drupal.org/project/clean).  I've also found a few good themes 
that have the features that I like and then I modify these as needed.  
In this case, it's best to start with a "solid" theme that can stand the 
test of time, functions, etc.

Here are some good links that might help:
Drupal 6 Theme Guide - http://drupal.org/theme-guide/6
Theme HowTos - http://drupal.org/node/22803
Theme snippets - http://drupal.org/node/45471

I'd recommend "Drupal 6 Themes" by Ric Shreves as well.  This was a good 
place to learn the D6 theming.  (I'm sure that I'm missing some great 
resources here, but just wanted to share my thoughts on theming from 
scratch.)

Sorry for the long message.  I hope this helps.
-Tina

Martin Hooper wrote:
> Anyone got any links to docs that will tell me how to go about
> creating a theme from scratch? Drupal 6.13...
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090912/d152a244/attachment-0001.htm>


More information about the support mailing list