Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Some people have experienced problems with taxonomy_theme not actually changing the theme. That's because the first module to call theme() gets to set the theme; others are ignored.
I've changed taxonomy_theme to use the _init hook so that it gets called early in the process of serving a node, so hopefully this will alleviate the problem. Thanks to ben miller for groundwork on this.
I have nearly the same problem described above.
But it seems like the issue is somehow related to taxonomy_menu module. I configured
taxonomy_theme according to the instructions. The pages (nodes) I want to theme are
associated with taxonomy twice (2 different vocabularies):
1. to categorize nodes and connect them to the menu structure (taxonomy_menu)
2. to apply a special theme to them (using vocabulary 'ThemeSelector')
When I navigate to a node using taxonomy_menu (i.e. /taxonomy_menu/xx/xx) the theme
does not change. But when visiting the node directly (i.e. /node/yy) the expected theme
is applied perfectly.
You were right (of course ;-) ) the module works perfectly on paths of node/1234.
But I needed a module to work with taxonomy_menu. So I created a module
called taxonomy_menu_theme for use with taxonomy_menu only.
Have a look at: http://drupal.org/node/45364
Comments
Comment #1
jvandyk commentedSome people have experienced problems with taxonomy_theme not actually changing the theme. That's because the first module to call theme() gets to set the theme; others are ignored.
I've changed taxonomy_theme to use the _init hook so that it gets called early in the process of serving a node, so hopefully this will alleviate the problem. Thanks to ben miller for groundwork on this.
Comment #2
profix898 commentedI have nearly the same problem described above.
But it seems like the issue is somehow related to taxonomy_menu module. I configured
taxonomy_theme according to the instructions. The pages (nodes) I want to theme are
associated with taxonomy twice (2 different vocabularies):
1. to categorize nodes and connect them to the menu structure (taxonomy_menu)
2. to apply a special theme to them (using vocabulary 'ThemeSelector')
When I navigate to a node using taxonomy_menu (i.e. /taxonomy_menu/xx/xx) the theme
does not change. But when visiting the node directly (i.e. /node/yy) the expected theme
is applied perfectly.
Regards, Thilo
Comment #3
jvandyk commentedCurrently taxonomy_theme is only invoked for paths of node/1234.
So if you made a url alias to taxonomy_menu/... that was named node/3000000 it would theoretically work.
The long-term solution would be to add support for taxonomy_menu into taxonomy_theme. I don't use taxonomy_menu myself. Patches accepted.
Comment #4
profix898 commentedYou were right (of course ;-) ) the module works perfectly on paths of node/1234.
But I needed a module to work with taxonomy_menu. So I created a module
called taxonomy_menu_theme for use with taxonomy_menu only.
Have a look at: http://drupal.org/node/45364
Comment #5
(not verified) commented