SES nested routes/namespace

Hi everyone,

In our routes.cfm files we are defining groups of routes using with() closure like this for example

`

with(pattern = “/:root-regex:(some regex)/:keyWord/:keyword2”, handler=“someHandler.something”)
.addRoute(pattern = “/:param1/:param2”)


.endWith();
`

i just wanted to know if it was possible to nest subgroups with multiple routes inside each group?

If yes, how?

Thanks for any help.

Kind regards

I’m not sure exactly what you’re thinking, but I believe the answer is no. basically addRoute just appends itself onto whatever the previous “with()” method set. I suppose that might be possible for us to support but it might only make sense for it to “build” up pattern.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad,

And your expectation is that these routes would get created?

patternAsubpatternAAA
patternAsubpatternAAB.
patternAsubpatternABC
patternAsubpatternABD

Yeah, it would be possible to do that, though it would get a little tricky since a “stack” of patterns would need to be maintained, each appended with the next “with()” and unwound with each “endWith()”.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad,