Usually, when an assistant needs a script view, this script is placed inside a partial one. The location of this partial file may vary depending on the structure of your directory, but the standard is:
application[/modules/name]/views/scripts/partials/
You can write an assistant with something like this:
class Cas_View_Helper_Foo extends Zend_View_Helper_Abstract
{
protected $partial = 'partials/foo.phtml';
protected $view = null;
public function foo($params)
{
$this->view->partial($this->partial, $params);
}
public function setView(Zend_View_Interface $view)
{
$this->view = $view;
}
}
source
share