0

I'm going down the classic route of 2 sites within 1 install for a client who has a multi-lingual site with Transcribe.

For those not familiar with that approach, here's the background. What we're doing though is routing all foreign language content through different domains.

This approach kind of works but if, for example, I edit the home page template, the primary domain gets updated but the secondary doesn't.

I've narrowed this down to the template path. If I add

$assign_to_config['tmpl_file_basepath'] = '/Users/steven/Sites/ee/multilang.dev/public/assets/templates';  

to index.php on the secondary domain, it works as I'd expect. I edit the home page template and both sites update. My issue though is that the template path will change depending on the server configuration.

In the main config file, we're setting

$base_path = $_SERVER['DOCUMENT_ROOT'];
$config['tmpl_file_basepath']   = $base_path . "/../_templates/";

Any suggestions on how I can change the config to work across servers?

1

So the answer to this was actually simpler than I thought.

In index.php of the secondary site we set

$base_path = $_SERVER['DOCUMENT_ROOT'];

and then

$assign_to_config['tmpl_file_basepath'] = $base_path . '/../../templates';

I also had to do the same thing with the path to snippets & Low Variables.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.