Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend Framework - How can I use the same view script with different actions in the controller?

My question basically is that I have lot of routes set up for CRUD operations. So inside the controller there are different action for Insert, Update, Delete and Select. For the Insert, Update and Delete I would like to use the same view script. Is that possible?

like image 983
beenetto Avatar asked Mar 29 '11 22:03

beenetto


1 Answers

You simply set the view script name using the ViewRenderer action helper. For example

$this->_helper->viewRenderer('action');

Edit: If the view script is part of a different controller, see ZEND, rendering different view with data

like image 78
Phil Avatar answered Oct 04 '22 03:10

Phil