2009年10月13日星期二

Re: [fw-mvc] View helper HeadScript

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


没有评论: