You either read wrong or I made a mistake in the documentation: Inner routes override the parameters of outer routes.

Innocentus wrote on 16.11.2009 17:56:
I am chaining two routes (a standard route with translated segments and a simple regex-route) to create a new route.

According to the documentation the module-, controller-, action- and parameters-settings of the outer route will be used for this new route.
However, I want that the parameters of the inner route are used instead.

Of course I could simply swap both routes so that the inner route becomes the outer route and vice-versa - but then the resulting URLs of both routes are also swapped in the final route. This I want to avoid because this would draw the new route unusable for my purposes.

I have also tried a second option: Before I chain both routes I change the parameters of the outer route. This works at first glance - but when I use the outer route in more than only one chain-operation and I change the outer route-parameters, then those parameters would change globally in every other chained route where the outer route has been involved in.

How can I force the use of these mentioned parameters from the inner route instead from the outer route for the new route? Sadly there aren't any public methods or properties with which one could change these parameters of a Chain Route.

Thank you for your answers in advance!
With best regards
Innocentus

Reply via email to