In CakePHP 2x I want to display some text when some condition is met and forward to another page when another condition is met, something like the code below. But this second part is not working.I know redirect only works from controller. Is there any way to do this in view?
if ($enable==2){
echo $introduction;
}
elseif ($enable==1){
**$this->redirect(array('controller'=>'pages' , 'action' => 'home'));**
}
Thanks in advance.