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.

When you want to create a list of years as a select field in CCK ranging from some set date in the past to the current date you have a couple of options. The first option would be to go through and manually enter every year from that date to present. This may be ok if you only are working with a date range of 3 or 4 years, but what if you want to list the years since the 1800s. Obviously that list would be painful to make, and what’s worse you would have to make sure the site was updated every year by someone competent enough not to destroy the information.

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.