ZEND rendering different views with data

I have a problem because I want to visualize the view from another controller and transfer the data there. Do you know how to do this?

I've tried:

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

But my if:

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

return 0

Do you know how to do this? THANKS!

+7
view zend-framework rendering
source share
2 answers

You mean you just want to display a different kind of controller action script?

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

Browse the manual page for the ViewRenderer assistant.

+24
source share

Display a view with action output.

on the browse page that you want to display, write this simple code.

 echo $this->action('list','users','main'); 

list is my action name

users - my controller name

main is my module name (if the module is used in your project).

0
source share

All Articles