Hello Zend Community. I'm using ZF 1.12. I'm trying to find out what I'm
doing wrong in my Bootstrap file in creating a View Helper. I want the view
helper to be available throughout the site. So I created a folder in my
library:  /library/App/View/Helper//

The class method is a one that calls the appropriate helper based on the
argument passed to it. So all of the helpers are in the same location (the
path mentioned above). Now as I stated in the Subject line, my
application.ini file worked. It's just the Bootstrap that doesn't. Here's
what I used for both:

*application.ini*

resources.view[]=
resources.view.helperPath.App_View_Helper_ = APPLICATION_PATH
"/../library/App/View/Helper/"

*Bootstrap.php*

protected function _initView()
{
   //Initialize view
   $view = new Zend_View();
   //add custom view helper path
   $view->addHelperPath(APPLICATION_PATH . '/../library/App/View/Helper');
        
   //do more stuff if needed
        
  //add it to the view renderer
  $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
                                        'ViewRenderer');
  $viewRenderer->setView($view);
  //Return it, so that it can be stored by the bootstrap
  return $view;
}

Any thoughts?




--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Successfully-Created-View-Helper-In-Application-ini-Unsuccessful-in-Bootstrap-tp4658785.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to