on main domain i load one context ... now i want some other contexts to load when you enter specific URL
i want:
mydomain.com => default "english" context
mydomain.com/it => show "italian" context
mydomain.com/si => show "slovenian" context
...
how can i do this? ... one way if i’m not wrong is to make that subfolders and copy index, htaccess and config file into it .. but i rather doit some other way
i created a plugin with following code: (wich by the way doesn’t work) .. i allways getenglish context
if($modx->context->get('key') != "mgr"){
switch ($modx->getOption('http_host')) {
case 'mydomain.com':
$modx->switchContext('english');
$modx->setOption('cultureKey', 'en');
break;
case 'mydomain.com/it':
$modx->switchContext('italian');
$modx->setOption('cultureKey', 'it');
break;
case 'mydomain.com/si':
$modx->switchContext('slovenian');
$modx->setOption('cultureKey', 'si');
break;
}
}
i also updated "italian" and "slovenian" context:
italian example:
http_host / mydomain.com/it
site_url /
http://mydomain.com/it
i missed something ?
thanx for answers