[drupal-support] Change theme by taxonomy

Kobus Myburgh itbjdm at puknet.puk.ac.za
Sun May 8 16:51:02 UTC 2005


Hello,

I am creating a theme that uses several css files. I want to load a different css file depending on the taxonomy term. If the term is "Animal" then load the animal.css file. If the term is "Human", then load then human.css file. This will result in the look and feel of the site being totally different, depending on which node is displayed and under which taxonomy term it categorizes.

When I put the <link rel...> statements in mytheme_page() function, I do not have the value of $node->nid yet, and therefore I can't switch to different css file. If I put the <link rel...> statements in the mytheme_node() function, it works fine, except that the theme logo doesn't change appropriately.

Any suggestions would be greatly appreciated.

Thanks in advance,

Kobus





More information about the drupal-support mailing list