Does anyone know how to correctly access a view's render method inside an
action helper? I have the following helper:
class Custom_Helpers_Widgets extends Zend_Controller_Action_Helper_Abstract
{
public function direct($widget) {
$response = $this->getResponse();
$response->insert('widget1', $this->view->render($widget));
}
}
It's simple but ilustrates my problem easily enough.
Then in my controller action:
$this->_helper->widgets('mailinglist.phtml');
I get the error message:
Fatal error: Call to a member function render() on a non-object in .......
I'm probably being stupid but I thought you were able to access a view
object in an action helper as if you were in the action itself.
--
View this message in context:
http://www.nabble.com/Accessing-view-render-method-in-Action-Helpers-tp22713020p22713020.html
Sent from the Zend Framework mailing list archive at Nabble.com.