views:

39

answers:

1

I created a custom helper, I was wondering if there was a way to access the view placehilders.

class Zend_View_Helper_MyHelper {
    public function MyHelper {
       $this->view->appendScript('myscript.js');
    }
}

I get: Call to a member function appendScript() on a non-object

Thanks!

+1  A: 

Solution:

class Zend_View_Helper_MyHelper extends Zend_View_Helper_Abstract
{
    public function MyHelper {
       $this->view->appendScript('myscript.js');
    }
}
Eric