How to close the layout?

I have an ajax request and I hope the layout don't work.

What should I do ?



1.5k

This is a sample function that may work for you. Just set the render level then specify the view you want to render as result for that ajax request.

public function latestUpdatesAction($user_id){
    $user = Artists::findFirst(array("id = :id:","bind"=>["id"=>$user_id]));
    $this->view->setVar('user',$user);
    $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
    $this->view->pick('user/user--latest-updates');
}