Advanced : Drupal Theming

I rarely do any heavy structural changes to node edit pages, so until today I hadn’t ever had a reason to disable vertical tabs on a specific content type, but there’s a first time for everything.

Now there are people who recommend turning it off by editing the $conf variable in the settings.php file… however, this is not an option on this particular site since it is running on Aegir, which automatically rewrites the settings.php file. So I had to find another way. I took a look at the vertical tabs code and came up with an easy solution.

There are two stages of understanding needed in order to create a template file for a form in a Zen subtheme. The first level in my opinion is to understand how to achieve that same result in a normal theme.

In a normal theme all we need to know in order to create a working tpl (template file) for a form is the form id in question and the format to connect that form to the tpl from within the template.php file.

Drupal is made to be customized; however some parts of Drupal theming don’t have much documentation written about them. Theming the search form is a good example. I don’t know if someone has added a tutorial in the last couple of months, but when I made the switch from Drupal 5 to Drupal 6 I couldn’t find a tutorial anywhere that explained how to do it, and the function that I had used for Drupal 5 was no longer working. So I tinkered with it a little, and after a bit of trial and error I came up with a method that works.