Thank you for your response: I have definitely considered this as my models (in the default module) are named App_Model_(modulename), and my services App_Service_(serviename), etc. That makes sense to me. *However* as far as I can tell, it seems to want to load Zend_View_Helper_(helpername) from my default module. I have not created any helpers in any modules at this point as the only helper I have created is the one that I use within APPLICATION_PATH "/layouts/scripts/layout.phtml".
I have also implemented Hector Virgen's comments as well regarding this (adding the resource to the application.ini), though I missed it, doesn't seem to make a difference, but I see the necessity (especially when I start creating any view helpers within the modules). So to recap, at this point, changing the name of the class (to App_View_Helper_LoggedInAs) - adhering to my default application namespace (and adding the resource helper path to the application ini), it does not work at all (in the default module or any other module). However when I keep the class name Zend_View_Helper_LoggedInAs, (and adjust the resource helper path in the application.ini accordingly), it works if I access any of the default controllers, but throws the exception when I access any controller in any other module besides the default module. So back to the drawing board, any other suggestions would be great to hear. Thanks Aaron Murray -----Original Message----- From: Markizano Draconus [mailto:[email protected]] Sent: February-28-11 5:46 PM To: Aaron Murray Cc: [email protected] Subject: Re: [fw-general] Problem accessing view helpers in the default (layout) within modules other than default. Hey Aaron, > I am having a bit of trouble with a view helper. I call a view > helper in my layout, and it works fine when I am accessing the default > module, however when I view a module page (with the same layout), I > get an exception. > > [Exception information] > > Message: Plugin by name 'LoggedInAs' was not found in the registry; > used > paths: Knowledgebase_View_Helper_: > /home/amurray/projects/bizweb/application/modules/Knowledgebase/views/ > helper s/ Zend_View_Helper_: Zend/View/Helper/ > > [In APPLICATION_PATH/application/views/helpers/LoggedInAs.php] > > class Zend_View_Helper_LoggedInAs extends Zend_View_Helper_Abstract { > public function loggedInAs() { > // [script inside function working fine] > } > } Consider: class Knowledgebase_View_Helper_LoggedInAs extends Zend_View_Helper_Abstract { public function loggedInAs() { // [script inside function working fine] } } Instead of the class that you are using right now. By using the class name Zend_View_Helper_LoggedInAs It's implied that the file: Zend/View/Helper/LoggedInAs.php needs to be loaded. Unless this view helper actually was in the ZF library, then that might be okay. However, it seems you are attempting to load something in your default application/views/helpers path, which means, you can use the default class names. Hope this helps, -Kizano //----- Information Security eMail: [email protected] http://www.markizano.net/
