routing icon indicating copy to clipboard operation
routing copied to clipboard

RouteList should define domain prefix

Open janbarasek opened this issue 4 years ago • 1 comments

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.

janbarasek avatar Jan 15 '22 11:01 janbarasek

Hi,

I guess you can create your own RouteList which extends the default one and handle what you need, or?

thorewi avatar Jan 15 '22 11:01 thorewi