Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZEND, rendering different view with data

I have a problem as I want to render view from different controller and pass there datas. Do You know how to do it?

I was trying:

$this->renderScript('index/index.phtml')->entries = $result;

But my if:

if (count($this->entries) <= 0)

return 0

Do You know how to do it? THANKS!

like image 726
canimbenim Avatar asked Jan 31 '11 22:01

canimbenim


1 Answers

Do you mean you just want to render a different controller action's view script?

$this->view->entries = $result;
$this->_helper->viewRenderer('index/index', null, true);

Check out the manual page for the ViewRenderer helper.

like image 133
Phil Avatar answered Sep 28 '22 17:09

Phil