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/

Reply via email to