[drupal-support] Change theme by taxonomy

Jeremy Epstein jazepstein at gmail.com
Mon May 9 14:53:44 UTC 2005


Kobus,

The easiest way to accomplish this is to use either the pathauto
module (http://drupal.org/node/17345), or my hierarchical aliasing
patch (http://www.greenash.net.au/posts/thoughts/hierarchical_url_aliasing),
to create hierarchical paths for your nodes (and terms) based on
taxonomy. You can then use the sections module
(http://drupal.org/project/sections) to apply a different theme to all
parts of your site that start with a certain path.

I tried out using my patch, in conjunction with the sections module,
on a development copy of my site (which is running 4.5). I created a
new section, set its pages to be "services*", and then everything
under the 'services' term on my site (i.e. nodes, child terms, and the
root term itself - I would have done "services/*" if I wanted
everything but the root term) suddenly had a different theme! I got
this working within 5 minutes.

Jeremy.



More information about the drupal-support mailing list