Template Design

Hanscraft's picture

Does anyone have resources (like step-by-step tutorials) for building templates in Drupal? As part of my library job, I'm being pushed into designing templates which will need stuff like image resizing capabilities, uploading stuff, etc. I know very little PHP. The regular Drupal forums haven't been very fruitful so I decided to try out the libraries + Drupal community on here for pointers!



It would help if you could

highermath's picture

It would help if you could explain what you need in more detail. Drupal has its own vocabulary and your request doesn't parse well in its terms. Templates are components of the theming system, and don't seem to relate to your request. There are many modules to handle file uploads, image resizing and just about anything else you might need to do. These do not require PHP knowledge to implement.

If you are in the library world, you might also want to consider joining the very active drupal4lib mailing list. To subscribe, send the command 'SUBSCRIBE DRUPAL4LIB First_name Last_name' in the body of an email to LISTSERV@LISTSERV.UIC.EDU.

There are hundreds of Drupal

highermath's picture

There are hundreds of Drupal training resources from screencasts and how-tos to tutorials and online classes available. Among the most popular are the courses from Lullabot.com and buildamodule.com.

You can Google just about any common Drupal task, along with the word screencast and find resources. The caveat, of course, is that these aren't rated or graded.

drupal basics

autopoietic's picture

I think Highermath has captured your issue in his first post. If you have any time/money I would suggest getting a decent drupal book (or request purchase through library) to guide you into the core concepts that drupal uses, as well as some decent practical examples. In fact I think a book would definitely save you time as with the correct foundation there is then so much help out there in the community.

Packt publishing do some books that might be suitable, for example:

I should say that I have not read the above book but it looks aimed at about the right level for you. I have previously purchased 'Drupal 6 Module Development' and it was a really great help, a brilliant investment (in contrast 'Drupal 6 Themes' was not helpful at all).

I hope you don't get put off by being 'pushed' into drupal. I felt that way with my first project and backed away for a while as it all seemed to have to great a learning curve. Now I'm pure Drupal, and its opened up a lot of opportunities for me.

Thank You!

Hanscraft's picture

I have experience with building Drupal websites, but completely revamping custom theming is a new territory for me. I'll be investigating some books in the coming weeks to see if I can find a firm foothold.

An example of what I need to do is create custom themed templates for each content type we have. I've looked through the PHP code that my boss wrote prior to my arrival but honestly, it looks a bit like gibberish since I don't know much about PHP. I would pull up a specific example, but I'm at home right now. He has fields in one content type that ask for an image URL, the caption, and click-through link. He then gives you opportunities with radio buttons to specify if the image should be floated left or right, and what size.

One of the issues I'm having is that I just don't know the terminology to be using. I think what I'm looking to learn about is hooks but I'm not really sure...

start from a good base theme

autopoietic's picture

To be clear, the configuration of content types that you describe is part of the site structure, rather than the theming system, likewise hooks mostly operate on the loading of content prior to theming. You can do almost anything with the display of fields using the theming system, but to be sustainable your theming solutions should deal only with visual presentation.

Are you stuck with editing an existing theme, or are you able to move to a new base theme? Also which version of drupal are you using (eg drupal 6/7) ?

I would suggest the simplest way to get to grips with theming is to start with a decent, organised base theme and add a few page and node templates yourself, (eg node-mycontenttype.tpl.php) adding your CSS to a separate stylesheet if possible.

some example base themes are detailed here:


I can recommend basic and clean(d6) as simple themes to start you out - a lot of people love zen but I find it all a little too much.

what do you want to do with the presentation of these fields?


Group organizers

Group categories


Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week