Napisalem view helpera co by nie zasmiecac layoutu. Jak wkladam go do layout to dotaje blad (ponizej), natomiast w view dziala bez problemu. Ktos cos?
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'ActionName' was not found in the registry; used paths: Zend_View_Helper_Navigation_: Zend/View/Helper/Navigation/ Zend_View_Helper_: Zend/View/Helper/;./views\helpers/' in C:\xampp\htdocs\shop\vendor\Zend\Loader\PluginLoader.php:424 Stack trace: #0 C:\xampp\htdocs\shop\vendor\Zend\View\Abstract.php(1182): Zend_Loader_PluginLoader->load('ActionName')
Plugin
<?php class Zend_View_Helper_HeadHelp extends Zend_View_Helper_Abstract { public $markUp; public function HeadHelp($layout=null) { $this->markUp.= ' <body>'; $this->markUp .= '<div class ="maincontainer">'; $this->markUp .= ' <div class="topblog">'; $this->markUp .= ' <div id="logo">'; $this->markUp .= ' <img src="images/logo.png" alt="Smiley face">'; $this->markUp .= ' </div>'; $this->markUp .= ' <div id="searchme">'; $this->markUp .= $layout; $this->markUp .= ' </div>'; $this->markUp .= ' <div id="tel">'; $this->markUp .= ' <img src="images/phoneContact.png" alt="Smiley face"> 0880000541 321'; $this->markUp .= '</div>'; $this->markUp .= '<div id="shop">'; $this->markUp .= '<img src="images/shopCardHover.png" alt="Smiley face"> Koszyk'; $this->markUp .= '</div>'; $this->markUp .= '</div>'; return $this->markUp; } }
Manual prawde Ci powie... po tylu godzinach znalazlem:
To use a helper in your view script, call it using$this->helperName(). Behind the scenes,Zend_View will load theZend_View_Helper_HelperName class, create an object instance of it, and call its helperName()method. The object instance is persistent within the Zend_View instance, and is reused for all future calls to $this->helperName().
Pozdr.