return template in views when request is not XHR
modified infrastructure