Render response without whole layout view template for ajax calls phalcon

Ajax calls render response  without  whole site layout templates view rendered

 

class AController extends ControllerBase
{
	public function getAction() {
    //Set the content of the response
    $this->view->setVar('is_ajax', true);
    $this->view->setVar('somevariable_toview', $somevariable_toview); 
    $content =  $this->view->getPartial('some/other/controller_actions/viewtemplatefile');
    set ajax response instead of whole template render
    $response = new \Phalcon\Http\Response();
    $response->setContent($content);    
    return $response;   
    }
}

 

Thats it