[eluser]Juris Malinens[/eluser]
I would create 2 folders in application/views:
*application/views/web/
*application/views/mobile/
and load view like this:
Code:
$this->load->view($SITE_TYPE."/auth/login");
where $SITE_TYPE could be defined by detection of mobile browsers or by making subdomain m.mysite.com and:
Code:
function isMobile()
{
if($_SERVER["SERVER_NAME"] == "m.mysite.com")
return true;
else
return false;
}
$SITE_TYPE = isMobile() ? "mobile" : "web";
I think isMobile function could be added in helper and function can be called in __construct of controller or maybe use hooks (I personally never used them).