Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend framework; Getting controller to use different viewer

I am using the Zend Framework.

I have a controller named 'UserController' that has a public function displayAction().

I would like to know how I can get that action method to use a different viewer than the default display.phtml.

Any help is appreciated.

like image 711
Jack Avatar asked Nov 12 '08 12:11

Jack


1 Answers

You can use

$this->render('actionName');

or, alternatively, you can call a view script directly by calling

$this->renderScript('path/to/viewscript.phtml');

For more information, you can take a look at http://framework.zend.com/manual/en/zend.controller.actionhelpers.html, specifically the parts about the render() and renderScript() methods.

like image 87
Aron Rotteveel Avatar answered Nov 08 '22 10:11

Aron Rotteveel