Closed (fixed)
Project:
Role Theme Switcher
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
24 May 2010 at 21:36 UTC
Updated:
29 Jun 2010 at 17:30 UTC
Hi,
Probably a newbie question, but I have a screen I have created that uses
theme('table', $header, $rows);
theme('pager', NULL, 25, 0);
print theme('page', $output);
I use the theme role switcher to set a specific role to a specific theme. But for some reason, the theme my table is displayed in is the default theme.
When I inspect $user->theme and $custom_theme the values are not set.
If I make a call to
role_theme_switcher_init();
at the begining of the function all is well, the values are set... but I am guessing that this is not the right "drupal" thing to do.
What is the right way to get the theme switcher to work?
thanks,
Comments
Comment #1
tiutiun commentedHello Ozecho,
I would suppose two things:
1. Probably you do have "admin theme" setting enabled, and you are browsing site as admin
------
The setting Home->Administer->Site configuration->Administration theme "Use administration theme for content editing" - if it is enabled, this setting overwrites the Role_Theme_Switcher behavior. So probably you would like to disable "Use administration theme for content editing" setting.
Role_Theme_Switcher consciously do not overwrite "Use administration theme for content editing" - if something can be done via Drupal interface just disabling the checkbox, it should be done there.
----------------
2. Perhaps your module have lower weight than role_theme_switcher, therefore when your module is being loaded, there's no role_theme_switcher loaded yet.
BTW, your code, is it a module code, or a template code?
Please let me know if this information brought any light, and thank you for the feedback
Respectfully,
Serj Tiutiun
Comment #2
tiutiun commented