By ubdr on
Hi,
How can i change the theme at run time. For example for node/1 i need garland while for node/2 i need minelli theme. Can anyone tell how it is achieved or send code snippets ?
Thanks
Hi,
How can i change the theme at run time. For example for node/1 i need garland while for node/2 i need minelli theme. Can anyone tell how it is achieved or send code snippets ?
Thanks
Comments
Use hook_init. Here you can
Use hook_init.
Here you can set:
I need to implement it in
I need to implement it in Ubercart's catalog module. I put your code in function theme_uc_catalog_browse of catalog module, but it did not worked....................................
In D7
In D7 use hook_custom_theme() or for more granularity set theme callbacks.
See:
http://api.drupal.org/api/drupal/developer--globals.php/global/custom_th...
http://www.snipplr.com/view/49976/
This is what I have used
This is what I have used before, which changes the theme based on what is in the url. This code needs to be in your module file.
Hi Bagz , Is 'mayo' the
Hi Bagz ,
Is 'mayo' the theme's name?
Yes it is
Yes, replace 'mayo' with the name of the theme you want to use. The theme must be one of the enabled themes.