Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend Framework render view of another controller

Is it possible to render view of another controller?

Because when i'm trying to pass path to render method it can't find it, but the path is displayed properly.

Is this were done for some security reason or i'm just doing it wrong way?

I'm trying to render view template of Index controller view/scripts/index/index.phtml from different controller action.

Message: script 'banner/c-xampp-xampp-htdocs-chat-application-settings/-/-/application/views/scripts/index/index.phtml' not found in path (C:\xampp\xampp\htdocs\chat\application\settings/../../application/views\scripts/) 
like image 450
Somebody Avatar asked Oct 11 '10 09:10

Somebody


1 Answers

You can simply do this in the action:

$this->renderScript('index/index.phtml');
like image 51
reko_t Avatar answered Sep 18 '22 13:09

reko_t