Is there any way in the CI routing file I can find out if a view is using a mobile?
and if so rotate them to a different page?
I've got two sets of controllers one for mobile and one for desktop but I'd like the urls to always be the same.
I've tried adding the following code to the routes config file but I'm getting an error...
Am I thinking about this totally wrong?
$this->load->library('user_agent');
if ($this->agent->is_browser())
{
$route['default_controller'] = "index";
} elseif ($this->agent->is_mobile())
{
$route['default_controller'] = "m/index";
}
The error I'm getting is Undefined property: CI_Router::$load