Different login page for each domain
Permalink Browser Info Environment
I have two effective domains running in paralllel on one concrete5 instance and desire each to have a unique login page.
Currently I am planning on using a custom login single page and a large if / else block based on hostname detection.
I was wonding / hoping there may be a more elegant way to map the /login path to unique visual presentations for each domain.
Thanks,
-Troy
Currently I am planning on using a custom login single page and a large if / else block based on hostname detection.
I was wonding / hoping there may be a more elegant way to map the /login path to unique visual presentations for each domain.
Thanks,
-Troy
Type: | Discussion |
---|---|
Status: | New |
Hi,
If you want to have completely different themes for these pages, you could do something like this in the /config/site_theme_paths.php file:
Best,
Antti
If you want to have completely different themes for these pages, you could do something like this in the /config/site_theme_paths.php file:
$v = View::getInstance(); $map = MultipleDomainsMapping::getByCurrentDomain(); if (is_object($map)) { if ($map->getDomain() == 'www.yourdomain.com') { $v->setThemeByPath('/login', 'yourtheme'); } else if ($map->getDomain() == 'www.otherdomain.com') { $v->setThemeByPath('/login', 'othertheme'); } }
Best,
Antti
Perfect thank you that's what I needed!
I'll have to use my custom theme for the interim but I will implement what you suggest after some testing.
Thanks again,
Mike
I'll have to use my custom theme for the interim but I will implement what you suggest after some testing.
Thanks again,
Mike
I think if I had not applied one of my themes to all pages I wouldn't need to do this. I'll let you know if I find a better solution.