drupal - Drupal6: $THEME_URL how to change themes based on full domain path -
i have function in settings.php:
$theme_urls = array( array('/optoelectronics','optotemp'), array('/power-devices','optotemp'), ); foreach ( $theme_urls $info) if ( strpos($_server['request_uri'],$info[0])===0) $conf['theme_default'] = $info[1];
..but, i've realized pre-processing , drupal output happens before hitting settings.php in case above, site have sharing content on different domain get's above 'optotemp' theme applied since has /optoelectronics section/page.
i tried using www.sitea.com/optoelectronics doesn't seem work.
i need drupal recognize absolute path, actual domain , not /optoelectronics part.
so, have custom page path url /optoelectronics , 2 variants. variant served has selection rules based on domains. works perfectly. now, since sitea has new theme needs keep old theme /optoelectronics section thought above function work discovered serves theme no matter actual domain is.
how can serve different theme based on actual domain? d6
note: using domain access module serve content based on domain. but, need control theme 2 sections of 1 site, while leaving sections as-is on second site.
have @ issue: http://drupal.org/node/622450
see 2 modules mentioned on top hook_init() function in http://drupal.org/node/622450#comment-2224478
Comments
Post a Comment