ZEND, rendering different view with data
16,533
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.
Related videos on Youtube
Author by
canimbenim
Updated on June 04, 2022Comments
-
canimbenim almost 2 years
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!
-
DS9 almost 10 yearswhat is the meaning of
,null, true
in this line:$this->_helper->viewRenderer('index/index', null, true);
i look in documentation but didn't found out. -
Phil almost 10 years@DS9 It's a call to the
direct()
method which in turn callssetRender()
. Second argument isresponseSegment
name, third is thenoController
boolean flag (doesn't attempt to prefix the path with the current controller name) -
DS9 almost 10 yearsThanks, it is useful.