5 terms (categories) with different page layouts

qbert423 - March 31, 2009 - 15:46

Fairly new to Drupal (been using it 2 weeks!) but like what I see so far. I've sorted out a front page using page-front.tpl.php, using Views module etc. but now I need to create varying templates according to which category the user is navigating in.

I'm creating a magazine site with 5 main categories. 1st category is main news and this is covered by the custom front page I've built. The remaining categories all need slightly varying "front pages" (ie. when a user clicks on one of the main navigation links, they are taken to the "front page" of that category).

My question is, what would be the best way to go about doing this? Any help much appreciated. Many thanks.

Changing theme or template file

matkeane - March 31, 2009 - 19:20

Hi,

There are a few modules that might do the trick:

http://drupal.org/project/taxonomy_theme - switches the theme depending on taxonomy term,
http://drupal.org/project/themekey - switches the theme according to path or other criteria,
http://drupal.org/project/sections - switches the theme, or template, according to path or other criteria.

or, if you prefer the DIY code route, this handbook page might help:

http://drupal.org/node/139766

 
 

Drupal is a registered trademark of Dries Buytaert.