public static function hook_view_name($view_name) { //TODO Check for a Theme here //Check for a Mobile version of the View $mobile = false; if (Component::isActive('Wurfl')) { $device = Wurfl::getDevice(); if ($device && $device->getCapability('mobile_browser') != '' || array_key_exists('mobile', $_REQUEST)) { $mobile = true; } } if ($mobile && Component::isActive('Mobile' . $view_name)) { $view_name = 'Mobile' . $view_name; } return $view_name; }