<?$APPLICATION->IncludeComponent("something:some.thing", isMobile() ? "mobile_template" : "desktop_template", array(...), false );?>
return preg_match('/ipad|iphone|android|mobile|touch/i',$_SERVER['HTTP_USER_AGENT']);