I’m building a new Drupal 5 site for a client, and I was dreading the hack-work I was going to have to do to make it look like what the designer had come up with. There are at least five distinct page templates in the crazy thing!
I love working with a designer, since then I don’t have to make all the choices, but sometimes it can lead to tons of work. It certainly has in this case. Most Drupal sites have just one template for a reason, but this one needed several, and they also needed to be maintainable and assignable after I was gone from the picture.
So, I started trying to figure out how I would handle such a beast. I decided to use Drupal’s Taxonomies to handle template selection. I made a Vocabulary named “Template”, and then added five terms to it: home, hometab, information, landingpage, and secondlevel.
Still, how to get Drupal to switch in the right page template at the right time? Then I found it, the perfect module for my needs, Taxonomy Theme. It let me assign templates to taxonomy terms, just like I was planning.
That was perfect, but what made it even more perfect was the synergy with Drupal’s concept of sub-themes. I simply made one master theme, with five subthemes. I overrode only the unique parts on each, and let the master CSS and page template handle the rest. It was a massive win for this project.
I’m still working on this project, with alpha delivery due in a couple weeks. However, what I had estimated to be 40 hours of custom programming turned out to be only a day of careful taxonomy creation and sub-theme organizing. Thank you, Thilo Wawrzik and John VanDyk, authors of this excellent module.
















2 responses so far ↓
1 Thomas Murphy // Dec 10, 2007 at 3:44 pm
Hey, this module does promise a lot and I’ve installed it, but I’m having trouble finding where the guts of it are in the admin section. Any pointers for someone lost in the woods?
2 obvious guy // Jul 23, 2008 at 1:13 pm
Of course not. What we be the fun of helping you get started using it?
yeesssshhh….
Leave a Comment