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

Type: Discussion
Status: New
solenis
View Replies:
designserve replied on at Permalink Reply
designserve
I am also struggling with this one. What I have done is to use an additional template and applied it to single pages that I share between sites. So that I can use a fairly plain template.

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.
Mainio replied on at Permalink Reply
Mainio
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:
$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
designserve replied on at Permalink Reply
designserve
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

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.