I actually tried something very similar, creating a custom Navigation class
and changing the its NS constant. However, because the findHelper() method
is the same as the parent class I hadn't copied it across to my new class.
Of course thinking about that means that the parent findHelper() method was
being called, and it was using the parent::NS constant, completely bypassing
the change I'd made.
Thanks,
Pete
Jurian Sluiman wrote:
>
> The big problem is Zend adds the helper path. Because all ZF helpers are
> inside Zend_Helper_Navigation_* and not Zend_Helper_*, the framework adds
> the
> namespace for these elements itself.
>
> This is in most cases done *after* you added the namespaces youself (e.g.
> in
> application.ini). Therefore, Zend will always find its own helpers first
> (because it searches inside the most recent added namespaces first). If
> you
> create your own Navigation view helper and add your own My_View_Helper_*
> namespace, it all works fine.
>
> As an example, I added my Navigation view helper here:
> http://pastie.org/671879. This works fine for all our
> Soflomo_View_Navigation_* helpers.
>
> Regards, Jurian
> --
> Jurian Sluiman
> Soflomo.com
>
--
View this message in context: http://www.nabble.com/Custom-Zend_Helper_Navigation_*-helper-tp26081193p26081667.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论