Some hints about overriding themes in Drupal 6

Grab the feed

School is a twelve-year jail sentence where bad habits are the only curriculum truly learned.

John Taylor Gatto

Recent comments

There's a lot to read and absorb on the new Drupal 6 but the good news is that if you've spent a while hacking version 5 you will need just a few days to get up to date.

One of my favorite changes is on theming. Now every module can provide its own .tpl.php files. To override them you just need to copy them to your theme directory and start hacking around.

Important: there's a new theme registry that has to be updated when you add or remove templates, to do so just click Clear cached data on /admin/settings/performance.

And even if using templates is the recommended method to create or modify themes in Drupal 6 you still can use good old theme_ functions.

Details can be found, as usual, on the handbook, theming Drupal 6, and there's an excellent summary presented as a flow chart (PDF, 60 Kb).

Drupal 6 theme flow

Keep your comments relevant, written in good English and don't spam. Let's create useful and valuable discussions. Markdown is welcome.

Add your comment