The view helper has a property $view so inside view helpers extending Zend_View_Helper_Abstract you should do $this->view->helper('something');
Jurian Sluiman
Soflomo.com
> Ed,
> View helpers shouldn't have an instance of $this->view no? Shouldn't it be
>
> $this->headScript()->appendFile('/js/test.js', 'text/javascript');
>
> ?
>
> On Tue, Oct 13, 2009 at 6:44 PM, Ed Lazor <edlazor@internetarchitects.biz>wrote:
> > Any idea why this isn't working from within a view helper that extends
> > Zend_View_Helper_Abstract?
> >
> > $this->view->HeadScript()->appendFile('/js/test.js',
> > 'text/javascript');
> >
> > It works if I move the line to the controller action.
> >
> > -Ed
没有评论:
发表评论