2010年6月24日星期四

Re: [fw-mvc] Extending navigation view helpers

I had exact the same case precise a year ago ;)
http://zend-framework-community.634137.n4.nabble.com/Zend-Navigation-visible-
in-sitemap-not-in-menu-td658632.html#a658633

I suggested to use a fallback when the default view helpers are not available,
but I never got an answer to that.

Regards, Jurian
--
Jurian Sluiman
CTO Soflomo V.O.F.
http://soflomo.com

On Thursday 24 Jun 2010 01:01:00 Hector Virgen wrote:
> Thanks, Jeroen. I think I'll go with that for now, but it would be nice if
> there was a better way.
>
> --
> Hector
>
> On Wed, Jun 23, 2010 at 3:46 PM, Jeroen Keppens
<jeroen.keppens@gmail.com>wrote:
> > I ended up doing exactly that (you hack), so I'm really curious aswell to
> > see other people's suggestions on this.
> >
> > Jeroen
> >
> > On 24 Jun 2010, at 00:40, Hector Virgen wrote:
> > > Hello,
> > >
> > > I need to extend Zend_View_Helper_Navigation_Menu to modify one of its
> >
> > methods. However, when calling $this->navigation()->menu() from within a
> > view, I always get the ZF version instead of my custom version. This
> > seems to happen because Zend_View_Helper_Navigation implicitly adds
> > Zend/View/Helper/Navigation to the end of the view helper's plugin loader
> > stack. Due to the stack being LIFO, it always returns the ZF helper
> > instead of mine.
> >
> > > Any suggestions on how to get around this? I'm considering giving my
> >
> > extended version a different name (such as "mymenu") but that seems like
> > a bit of a hack.
> >
> > > --
> > > Hector

没有评论: