Route to change admin url structure

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Route to change admin url structure

RustedBucket
I've got a bunch of modules that have AdminController's so they are accessed via:
http://www.domain.com/module/controller/admin/action

What I'd really like to have is a route that alters that for all Admin controller cases to be:
http://www.domain.com/module/admin/controller/action

Is this possible with a route? If so, can someone give me a hint, please... Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Route to change admin url structure

renatomefidf
This post has NOT been accepted by the mailing list yet.
Yes, it is.

You can use default module route: http://www.domain.com/module_name/controller_name/action_name

And you can also register a route with another url and set it's params to another module:
resources.router.routes.ROUTE_NAME.route                                  = "/MY/FRIENDLY/URL/*"
resources.router.routes.ROUTE_NAME.defaults.controller                    = "Controller Name"
resources.router.routes.ROUTE_NAME.defaults.module                        = "Module Name"
resources.router.routes.ROUTE_NAME.defaults.action                        = "Action Name"