routing
routing copied to clipboard
RouteList should define domain prefix
Very often I need to define a group of routes that have a common prefix in a single RouteList.
For example locale:
$router = new RouteList('Front');
$router->addRoute('https://%host%/<locale>/<presenter>/<action>', ...);
Now there is no easy way to set a common prefix for all routes in a domain (module).
It could be set as a RouteList second argument:
$router = new RouteList('Front', 'https://%host%/<locale>/');
$router->addRoute('<presenter>/<action>', ...);
Thanks.
Hi,
I guess you can create your own RouteList which extends the default one and handle what you need, or?