Using Drupal 6.9, Virtual Sites 1.3
I created a custom, Zen-derived theme. I have 3 virtual sites set up, switching based on the Drupal/Sites/sitex.mysite.local condition. The switching is working properly.
I am able to specify different themes for each site and that functionality is working correctly. What is not working is the Administration Theme as set at http://sitex.mysite.local/admin/settings/admin. I'm just trying to keep Garland for my admin entry point and it seems to get overridden by my site-specific theme.
I can set up an Administrative "virtual site" so that I can keep Garland as the theme, but I would love to get any input you might have on where the theme gets overridden in the Virtual Sites module and how we can tweak it so that it allows the Administration Theme setting to be applied correctly.
Thanks much!
Craig
Comments
Comment #1
craigmc commentedSet up a workaround.
This code was adapted from the admin_theme.module and the system_init() hook in system.module
if (($context['theme']) && (!_needs_admin_theme())) {I know this is a bit of a hack, but it accomplishes what I need for the time being.
Comment #2
kndrMy solution is:
1) Go to admin/build/sites
2) Don't use 'Theme' feature (set to 'skip this feature') for every virtual site
3) Use 'Variable' feature for every virtual site:
theme_default=zen_subtheme
admin_theme=garland
(zen_subtheme is the name of your default theme and garland is the name of your admin theme)
I've also change weight of module 'Virtual Sites' to -1 in {system} table.
Comment #3
dpatte commentedWhen changing the weight, did you set only the main virtual sites module weight to -1, or did you also set all its associated submodules.
I'm noticing an issue with languages. If i set a virtual site to french, it starts in french as expected, but the user cannot override the language using the standard language selection block.
Comment #4
kndrYes. I've changed weight only in main virtual sites module. I have an issue with page admin/build/block since themes doesn't switch properly. I've defined additional conditions because it is important that virtual sites shouldn't be changed on admin/build/block and admin/build/themes. Even so I still have problem on admin/build/block. Every time I've noticed problem I must go to admin/build/themes and submit themes. After that, build block page works properly. Strange.
Comment #5
kndrTry also this: http://drupal.org/node/648252#comment-2400524
Comment #6
utneon commenteddid you solve this problem?
Comment #7
adamps commentedI have the same problem in v7. We need a way to make Virtual Sites not apply when in the admin theme.