DrupalCon Boston 2008 - Theming with Devel module

Tue, 03/04/2008 - 21:06 -- brad

First impression: Oooh... this looks a lot like the Firefox Web Developer toolbar (which I love and depend on), but for Drupal theming. That's hawt.

[Note: Requires separate download of Krumo to get the really pretty output. See Devel readme.]

Theming Notes for Drupal 6

  • Subthemes means you never touch your base theme... you do everything in the subtheme. That's pretty rad (and I like how Moshe gets the giggles just talking about it). It's kind of funny how something as simple as inheritance is this exciting, but damn what a step up from D5 theming.
  • ?R - a cool trick by D6 to keep browsers from caching CSS/js at inappropriate times... the GET value increments when CSS/js files change.
  • Views2 in D6 is also hot hot hot.

Tips for using Theme developer

  • Disable the Theme developer when not using it, because it messes with your HTML (again, like Firefox Web Developer toolbar).
  • The Theme Registry is a monstrous list of all themeable functions, with all sorts of cool details. Very helpful for debugging.
  • Helpful hint: remember that overrides can take the form of template overrides (ie, a new foo.tpl.php file) or function overrides (in, e.g., template.php)
  • Question:: How much of this is PHP5 only? A lot of it uses PHP5 reflection. Answer: you lose the names of function arguments w/php4, but that's all.

Ducking out a bit early to return to Libraries BOF.