ZF-2814: Create View Helper to Render code into a placeholder


Another thing you could do is create your own helper -- let's call it 'renderToPlaceholder'. It could work like this:

    <? $this->renderToPlaceholder('account/_signin_side.phtml', 'RIGHTBAR') ?>

and internally have code something like this:

    class My_View_Helper_RenderToPlaceholder
        public $view;

        public function setView(Zend_View_Interface $view)
            $this->view = $view;

        public function renderToPlaceholder($script, $placeholder)
            echo $this->view->render($script);

Place it in your helper path:

    $view->addHelperPath('My/View/Helper/', 'My_View_Helper');

and you'd be good to go.


Please categorize/fix as needed.

I created this issue for Matthew. He would know more about it than I do. It was from the mailing list.

Scheduling for next minor release (new functionality)

Resolved at r10747 in trunk. Resolved at r10748 in release 1.6 branch.

Updating for the 1.6.0 release.