Some hints about overriding themes in Drupal 6

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

Trackback URL for this post:

http://www.ventanazul.com/webzine/trackback/117

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h1> <h2> <h3> <h4>
  • Lines and paragraphs break automatically.

More information about formatting options