Sunday, January 17, 2016

$this->render('index');

I have tried for two days now to figure out why $this->render('index'); is not working on my controller method,here is the controller action I am running $this->render('index');
Thanks.
public function search(){
if($this->request->is('put') || $this->request->is('post')){
return $this->redirect(array(
'?'=>array(
'q'=>$this->request->data('User.searchQuery')
)
));
$this->User->recursive = 0;
$searchQuery=$this->request->query('q');
$this->Paginator->settings = array(
 'User'=>array(
   'findType'=>'search',
 'searchQuery'=> $searchQuery
 )
 );
$this->set('users',$this->Paginator->paginate());
$this->set('searchQuery',$searchQuery);
//$this->autoRender = false;
   $this->render('index');
}
}

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: