hi,
I'm looking at using Drupal for an organization's website that I consult for. It seems to be the best technical solution for the new vision they have, and adding new content is generally a snap.
Here's the catch, though; they want their own custom theme. The guy that did the last version of the website is a great designer and makes stunning work that is clean, eminently usable, and effective. His current sphere of knowledge, however, is confined to XHTML/CSS.
I've never written a Drupal theme myself, but a cursory examination makes it look like there's at least some PHP code to write (although it appears to be mostly copy/pastable). We can afford to invest some time in learning how to write Drupal themes, but not too much.
So, I'm writing to ask for some suggestions:
- If one already has significant web design experience, how well does that experience translate over to making a new Drupal theme? Is it, for instance, a completely different experience from anything else? Or is it mostly similar, with perhaps minor injections of PHP code and some templates to follow?
- What are some good resources should I point him towards to get started? (Again, he doesn't have any web development experience in areas other than XHTML/CSS.)
- What's the best way to leverage our designer's existing XHTML/CSS knowledge if we ask him to make Drupal themes? Should we tell him just to start coding away and checking out the resources? Or should he work off of an existing theme and make edits to it?
Also, finally, one somewhat more technical question: how much has the themes engine changed between 5 and 6? We're probably looking at using 5 for now; will that cost us significant effort if we decide to upgrade to 6 at some point?
Any help you guys can give is much appreciated. Thanks!
-fj²
Comments
My experience
I created own theme on 4.7.x (http://www.naturista.cz), then upgraded to 5.1 successfully. Generally I think that the best way is to start with some other theme, and do edits (until it's completely replaced, if necessary), because writing from scratch leaves you without of chances for testing, until the whole is done somehow.
Drupal theming is not just about HTML/CSS design, unfortunately. HTML is produced by the system, and leaves you with a bit limited chances to change it, by default. Generally, the developers' answer is that EVERYTHING in Drupal is themable, but it often involves insertion of custom functions into template.php file and such, which is really hard for a newbie, and almost undocumented. Searching the forums for solutions consume a lot of time. So for a novice, large portion of Drupal's HTML is somehow NOT themable.
The CSS is another big question: Drupal includes it's own CSS, so trying to make elegant solutions like custom CSS classes applied to large portions of the page, simply doesn't work. The CSS theming is rather a big fight for overriding Drupal's CSS on single elements, and it's sometimes quite difficult to realize where the unwanted behaviour came from, as Drupal's and custom modules' CSS files are large and many. It's possible to remove default CSS, but then you have to style everything, including admin- and other pages you probably never heard of, so I don't think this is a good idea.
Good news is, that updating my theme from 4.7.x to 5.x was no big deal, just a few "copy-and-paste" replacements documented here on Drupal.org, and tracking down very few CSS issues, where the class-names changed for example. Took just a few hours to get the theme working on 5.x. I guess that 6.x might be similar.
welcome to the fun
Drupal's a lot of fun and a good platform for long term investment of time in.
If your current sphere of knowledge is confined to XHTML/CSS then you should be good to go for a lot of it (not all).
1. In many ways lots of web design experience will help. The theme is merely the template for the data., So you are not necessarily designing 'per page' as you are for the entire sight. You can do per page themes if you want but it's not currently very clear on how to do this.
2. The handbook does have a lot of good information (yes it can be a little confusing but there's close to 2000 pages). The Pro Drupal Development book is an excellent resource. Download other themes and see what did. The Drupal Dojo group will probably be an excellent resource for him. Also check out this video cast. If I can do it as an amatuer, then he should be able to as a pro. The biggest issue will be the underlying assumptions of individual page based layout vs using a CMS.
3. Check out this article for a quick start intro. I suggest starting with your own theme pulling elements out of Blue Marine as it is simple. Others will advocate using Zen theme as it was designed to be feature rich and flexible and still oriented towards modification primarily through CSS only. Which direction you go depends on which approach 'clicks' for you. :)
Change from 5... quite a bit and not so much. There is always change between versions. In general those changes will be referenced in the handbook in the update page. We tracked most of the changes in the theme system this time so it will be easier to write the documentation for them as there were more 5 -> 6 changes then 4.7 -> 5 changes. That said I think you and others will find it easier to do theming in 6 then ever before. Also, once you get your site up, there is no rush to D6.
Check out these slides on some thoughts for building out your site.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
spot on
JirkaRybka is spot on with the observation for newbs -- at least AFAIAC.
While yes virtually all aspects are themeable, as a practical matter the lack of thorough, easy-to-use documentation makes the system rather less opaque. If you are just looking to build a single site and move on, perhaps to meet a particular client's needs, it is very difficult to jsutify the investment.
On the other hand, if you are looking to get into drupal seriously (which is a good thing!), then read on and roll up your sleeves.
The APress Pro Drupal book is good, but has only one chapter on Themes. There are some good bits and bobs floating around online. You can also hit this resource and run searches effectively, as it spiders most of the major Durpal sites (both official and unofficial): http://cms-search.waterandstone.com
Good luck!
Drupal Experiance
A bit of background, I was once like the designer in question, had very strong XHTML/CSS skills but a fear of merky waters php swims in when confronted with Drupal. 3 months into Drupal I found 'its not all that bad' had produced a few sites, now nearly 24 months in, custom php code, styling, coding is a breeze. The once merky waters of php are now tropical clear blue seas!
My advice, if your are good with XHTML/CSS make a demo page using solely those languages first. Then test, validate and tweak that single page until you are happy with the final result. Next modify an existing theme, the out the box Bluemarine is great but the CSS is bloated, try downloading 'wireframe' (it will work with Drupal 5 you just need to copy all the section from bluemarine), using your demo CSS copy this over all the supplied CSS, move your XHTML into your page.tpl.php and strip the dynamic areas the php generates out o the demo code you have written and use the queries supplied with the theme, (left side bar, header, right side bar, logo etc etc). It will take some trial and error to get it as you want, but you will have a stunning theme before the night draws in I promise.
You can then really begin to appreciate the power Drupal offers!! Whether you decide to continue to work Drupal once the project is complete is your call, it is definitely well worth the initial effort and head scratching.
...
Perhaps I should clarify my comment. When I say start with Blue Marine, I don't mean the css, I mean the page.tpl.php and node.tpl.php files for pulling together a first template.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide