Thanks Sean, I’m not sure this works in my scenario, I have local, staging and live environments that I am catering for in config.php (Note this is an EE1 site) and then on top of that I have MSM installed but admin takes place through only the parent domain. The problem I have is that when you then try to create a template and save it to disk the CP ‘thinks’ the path for the templates is that of the domain through which the administration is taking place, as opposed to the domain/site which you have selected in the MSM drop down menu within the CP. In the end I found a way around this using the following code block in my config.php file:
if (stripos(strtolower($HTTP_SERVER_VARS['REQUEST_URI']), '/admin/index.php') !== false) {
// switch to cater for cp template path handling where we have multiple sites
if ($_REQUEST['exp__cp_last_site_id'] == 1) {
$conf['tmpl_file_basepath'] = '/Users/Nathan/Sites/domain.com/trunk/public_html/templates';
} else {
$conf['tmpl_file_basepath'] = '/Users/Nathan/Sites/domain.com/trunk/public_html/sites/sub_site_1/templates';
}
} else {
$conf['tmpl_file_basepath'] = '/Users/Nathan/Sites/domain.com/trunk/public_html/templates';
}
Obviously this would need to be expanded if you had more than just one sub site but it does the job for me! 😊