Hector Virgen wrote:
> 
> 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
> 

I guess what I find confusing in this is that the route 'default' is not
used as the default.  You see the word default and you expect that if
nothing is specified, then the default value should be used.

A lot of confusion could be prevented by simply changing the word 'default'
to something else. 'standard' or 'base' or 'basic' perhaps.  Either that or
make the 'default' route work as the name implies, as the default route when
nothing else is specified.

I would think that if you wanted to follow some other route than the
default, it should be specified.  The way it stands, you can use the url
helper and navigation without giving it a second thought and it works
perfectly, but then you add a route and suddenly it's all reversed and all
your links (as based on most of the examples around) are suddenly incorrect
... or imprecise at best. 



Peter Sharp 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-tp3331646p3334286.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to