There is simple way to do this:
inside your action controller just call something like
$this->view->action($actionname, $controllername);

For example:
class PortletController extends Zend_Controller_Action
{
    public function renderAction()
    {
                $current_html = $this->view->action($portlet['action'],
$portlet['controller']);
                $this->view->content = $current_html;

    }
}


Juan Felipe Alvarez Saldarriaga wrote:
> 
> hey! :)
> 
> Question, I'm trying to do this, I'm on a controller action and inside
> this action I want to execute another one and then get the rendered html,
> is that possible ? I'm doing something like:
> 
> public function myAction()
> {
>     // Execute another action using _forward method.
>     $this->_forward( "anotherMy", "anotherController", "anotherModule",
> array( "id" => $this->getRequest()->getParam( "id" ) ) );
> 
>     // Get the current response.
>     $this->view->strAnotherMyBody = $this->getResponse()->getBody();
> 
>     // Render current view, my/my.phtml
>     $this->render();
> }
> 
> What's the best practice ?
> 
> Thx for any help.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-render-multiple-action-views---tp15643692p22985345.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to