Zend's Navigation_* view helpers are not located in the same place as all of
the other Zend view helpers. This means the "parent" Navigation view helper
has to register a new prefix/path pair on its own.

Normally this prefix/path pair gets registered *after* your application is
bootstrapped. This means your prefix paths end up looking like this:

Zend_View_Helper => Zend/View/Helper
Custom_View_Helper => Custom/View/Helper
Zend_View_Helper_Navigation => Zend/View/Helper/Navigation

Since Zend_View uses a LIFO stack for resolving view helper paths, it ends
up finding the "menu" helper in the path Zend/View/Helper/Navigation and
uses that one -- which is not what you want.

To get around this, you can manually register the prefix/path for Zend's
navigation helpers and then register your custom path. I normally use
application.ini for this:

   resources.view.helperPath.Zend_View_Helper_Navigation =
"Zend/View/Helper/Navigation"
resources.view.helperPath.Custom_View_Helper = "Custom/View/Helper"

This results in a prefix/path stack that looks like this:

Zend_View_Helper => Zend/View/Helper
Zend_View_Helper_Navigation => Zend/View/Helper/Navigation
Custom_View_Helper => Custom/View/Helper

At this point Zend_View should now be able to find your custom "menu" view
helper.

--
*Hector Virgen*
Sr. Web Developer
http://www.virgentech.com

Reply via email to