Wednesday, 17 October 2012

How to call two different views from same action? | Zend Framework Interview Questions

Example1:
Public function indexAction() {
If(condition)
$this->render(‘yourview.phtml’);
Else
Index.phtml;

Example2:
Public function indexAction() {
}

Now in your index.phtml you can have this statement to call other view
$this->action(‘action name’,’controller name’,’module name’,array(‘parameter name’=>’parameter value’));

No comments: