New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unset _locale parameter if matching route has been found #56
Conversation
unset _locale parameter if matching route has been found
thanks |
hm. what if there is {_locale} in the route? should we check that before unsetting? |
Hi, What about variables in the route patterns at all? Cheers Am 05.04.2013 um 11:06 schrieb David Buchmann notifications@github.com:
|
we do have the locale in the route when using the SimpleCmsBundle in the multilang mode (like we do in the SE). |
So you create a node with name {_locale} at the top of the routing tree? If 2013/4/5 Lukas Kahwe Smith notifications@github.com
|
I fear we have to string-search for that in the pattern. Or would getParameters work here to check? ----- Reply message ----- that's possible this PR is wrong and should be reverted. 2013/4/5 Lukas Kahwe Smith notifications@github.com
— |
no we do this dynamically in the route provider. but yes in the end there is a _locale placeholder. check the SE |
You do it in SimpleCmsBundle\Document\MultilangRoute.php This could be part of the RoutingExtraBundle ? |
sorry .. i was unclear before .. its done inside the Route itself: |
So I propose the following: we compile the route already in ContentAwareGenerator and check the variables for _locale. If it is not there, it can be safely unset. I'll try to do a PR for that. |
that sounds like an excellent idea. it does not cost us anything as the |
See issue #55