I have a problem with accessing a custom view helper in a view. Call the helper in the layout.phtml works perfectly.
ZF Version: 1.11.2
application.ini
resources.view[] =
Bootstrap:
protected function _initViewSettings()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->doctype('XHTML1_STRICT');
$view->setScriptPath(APPLICATION_PATH . '/views/scripts/');
$view->addHelperPath(APPLICATION_PATH . '/layouts/helpers/', 'Layout_Helper_');
$view->addHelperPath(APPLICATION_PATH . '/views/helpers/', 'View_Helper_');
}
Helper: (application/views/helpers/Loader.php)
class View_Helper_Loader extends Zend_View_Helper_Abstract
{
public function loader()
{
$loader_html = '
<div class="loading">
<div class="bullet"></div>
<div class="bullet"></div>
<div class="bullet"></div>
<div class="bullet"></div>
</div>';
return $loader_html;
}
}
View:
<?php
echo $this->loader();
?>
Error:
Plugin by name 'Loader' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/
Why can't I use the helper in my view?