In your navigation configuration you need to specify which route to use for each page -- it won't default to the "default" route. Without specifying a route it's like calling the Url view helper and passing in NULL as the route (which ends up using the currently matched route).
-- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Thu, Mar 3, 2011 at 6:01 AM, Stryks <str...@hotmail.com> wrote: > > Peter Sharp wrote: > > > > I have defined a custom route in order to capture a parameter in the > > middle > > of a URL. > > > > ... > > > > Which seemed to give the desired result. However, once I have arrived at > > the URL, all my zend_navigation URL's insert the literal part of the > > custom > > route. i.e. the home link now ends with \vendor. So once at that URL, > no > > links work to allow navigation back to the default controller. > > > > ... > > > > I have figured out a workaround, by specifying the default route for each > > element added to zend_navigation, but it seems that this should not be > > required. Surely the default route should be the ... well ... default > > unless I specify otherwise? > > > > Ok ... so after a long and relatively fruitless search, I decided to have a > look in the Zend Framework Issue Tracker ... and there we go. > > My workaround seems to be the desired way to use zend_navigation and the > url > view helper is to specify that the default router is to be used on each > url() call and zend_navigation element in order for the current route not > to > be. > > I have commented on the issue I found, but this seems odd to me. Surely > 'default' should be used by default unless another named route is supplied? > > There is also another issue that I've had and like this one, I somehow > managed to figure out the way to make it work. If you have a named route > and you are using zend_navigation, you must specify a default or required > value for the variable part(s) of your route or it will throw an exception. > > This may be related to using zend_acl with zend_navigation and custom > routes, but surely I'm not the only one doing so. > > I am right on both these things, yes? They are "expected"? > > Thanks > > -- > View this message in context: > http://zend-framework-community.634137.n4.nabble.com/Setting-a-custom-route-seems-to-break-zend-navigation-URLs-tp3331646p3333385.html > Sent from the Zend Framework mailing list archive at Nabble.com. >