No, it defaults the the route that matched the current request. It works similarly to the "url" view helper.
Do you have any custom routes set up? It seems to me that you may have one that looks something like like this: /:controller It seems like that's the case because normally with only the default built-in route your navigation should have worked since all of your pages would have used the default route when requested. -- Hector On Sun, Feb 21, 2010 at 10:31 PM, Cameron <[email protected]> wrote: > Ahh ok, thanks, that works. But if there's no route in either the request > or the config it defaults to... breaking the URLs? > > On Mon, Feb 22, 2010 at 2:24 PM, Hector Virgen <[email protected]> wrote: > >> It helps to specify the route because Zend_Navigation uses the current >> route to create the url instead of the default route. So your navigation >> should look more like this: >> >> <home> >> <label>Home</label> >> <controller>index</controller> >> <action>index</action> >> *<route>default</route>* >> </home> >> >> -- >> Hector >> >> >> >> On Sun, Feb 21, 2010 at 10:14 PM, Cameron <[email protected]> wrote: >> >>> Hi everyone, I've got an unusual issue with Zend_Navigation that seems >>> like it should work correctly, but isn't. >>> >>> Here's a basic example of the config... >>> >>> >>> <nav> >>> <home> >>> <label>Home</label> >>> <controller>index</controller> >>> <action>index</action> >>> </home> >>> <admin> >>> <label>Admin</label> >>> <controller>admin</controller> >>> <action>index</action> >>> </admin> >>> <booking> >>> <label>Bookings</label> >>> <controller>booking</controller> >>> <action>list</action> >>> >>> <pages> >>> <list-booking> >>> <label>List bookings</label> >>> <controller>booking</controller> >>> <action>list</action> >>> </list-booking> >>> <calendar> >>> <label>Booking calendar</label> >>> <controller>booking</controller> >>> <action>calendar</action> >>> </calendar> >>> <add-booking> >>> <label>Add booking</label> >>> <controller>booking</controller> >>> <action>new</action> >>> </add-booking> >>> </pages> >>> </booking> >>> </nav> >>> >>> The problem exists when you're not on a URL that includes both controller >>> and action parts. If I go to http://example.com/base/url/admin, it >>> defaults to the index action, which is fine, but in the menu above none of >>> the actions display, so all of the Booking menus all say just >>> http://example.com/base/url/booking. Once you're actually "in" the menu >>> and using links generated by the menu, it all seems to work fine. Has anyone >>> got any idea why it is behaving this way? >>> >> >> >
