2009年7月15日星期三

Re: [fw-mvc] howto: capture action output, stream it as pdf

Carlton Gibson-2 wrote:
> But I want to capture the whole layout, including its content. > Ah, okay.

(This is just off the top of my head...)

//render the current action's view script via the ViewRenderer
$this->_helper->ViewRenderer->render();

//render the layout manually and capture the output
$output = $this->view->render(path/to/layout.phtml);

//disable the layout
$this->_helper->layout->disableLayout();

Try that.

Well, I did, but then the $output becomes the layout only, without its contents. What I need to capture is the whole layout, including its content. Pfew, this use case shouldn't be so difficult, but I am quitte puzzled?
calling
$this->_helper->ViewRenderer->render();
should influence

//render the layout manually and capture the output
$output = $this->view->render(path/to/layout.phtml);


but it doesn't. Unfortunately, zend_layout is a bit of black magic.


View this message in context: Re: howto: capture action output, stream it as pdf
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: