Le 22/01/2011 16:14, Wojciech Sznapka a écrit :
Hi,
how can I write routes to achieve something like generic route, which
redirects to dynamically resolved controller?

generic:
   pattern: /{_controller}/{_action}
   defaults: {_bundle: ExpencesBundle}

I want this route to be kind of generic catch-all. So it will do
following routings;
/operations/index =>  _controller: ExpencesBundle:Operations:index
/stats/monthly  =>  _controller: ExpencesBundle:Stats:monthly

is it possible in Symfony2?

It is not possible this way as the _controller variable is something like Bundle:Controller:action

A bundle adds the possibility to use a generic route but it is absolutely not up-to-date with Symfony2 : https://github.com/hidenorigoto/DefaultRouteBundle
Maybe it can help you if you update it.

--
Christophe | Stof

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to