Methods for designing with / theming drupal

openbook - April 10, 2008 - 20:25

Hi,

This post is intended to start an ongoing discussion on the various methods people are using when designing custom themes for drupal.

I want to compare designing for bespoke / custom sites (ie those built using your own HTML/PHP code etc) with the methods that are now being used to style drupal sites. I think this is a particularly interesting topic as I've had a lot of designers express to me their apprehension of moving to drupal because the theming process goes against everything they're used to doing.

First of all to describe the 2 stage process I was used to at the company I work at before we started using drupal (i.e used when creating bespoke website code):

1. once the desired design has been selected by the client the designer begins creating a basic HTML version of the site to match the design
2. the developer then begins making the site dynamic by using the designer's HTML to create the required site structure.

This method meant the designer had complete control over the HTML and the majority of their job was completed when the design / HTML was signed off.

To look at how Drupal works - it has a core system style and various templating engines to allow users to apply existing styles to their site. However the first time we tried to create our own custom style for a drupal site we were stuck in the practice mentioned above and quickly found ourselves hacking various elements of the site so that we were able to apply the designer's html and css. We soon found out that this is wrong way to do things as it meant site development was slower than it should be and also certain drupal styles remained unnoticed so when we thought we had finished the site it in fact still looked a bit of a mess in places.

Please don't judge me too much on this, i'm sorry we were new to drupal, it was a little bit baffling at the time but we've definitely learnt our lesson. :P

Employing the lessons we've learnt the current approach we use at my company is as follows:

1. a default drupal installation is setup and the designer selects the theme (from drupal.org) that is most structurally like the desired outcome.
2. the designer either creates a basic HTML page for the site structure that is used as the basis for creating a new page.tpl.php file or modifies the existing page.tpl.php.
3. any required content types and some demo content is created by the coder to give the site some structure.
4. the designer then begins styling the various site elements by loading an example page/block (etc etc) and then (using tools like firebug and web developer toolbar) modifies/overrides the css to achieve the desired style.
5. if the designer is unable to style the content in the way he/she wants because an HTML change is required then if the task isn't too programmatically advanced he/she either edits the .tpl.php files or the coder helps out by making changes to the templating system.

This method has greatly sped up our development process :) However comparing this to the previous design process there is no longer two distinct stages of design then development rather the designers are involved throughout the development of the site.

You may say "why doesnt the designer make their changes to the .tpl.php files and template.php?", but the designers I work with don't really want to have to deal with PHP and code and likewise in a busy company coders dont have the time to be explaining php code to them. So the fundamental process from the traditional method to the drupal theming method has changed.

Now I am lucky in that I work alongside the designers in my office but recently I've had people out of the office asking me if I could apply their design to a new drupal site. The thought of trying to implement the process I use in my office with remote a designer (who doesnt know much about drupal) who i'd have limited contact with is quite daunting - the thought of spending hours on the phone explaining to the designer how to style a drupal site scares me. I guess this depends on the designer. However I'd like know if anyone else has some thoughts on this issue? Or if anyone would like to share their approach to creating custom themes for drupal?

Please let me know what you think.......

 
 

Drupal is a registered trademark of Dries Buytaert.