addRoute()

Curious question, is there a way to tell a route to look at handlers in a specific directory / path rather than bouncing all over the handlers directory looking for a matching handler?

Example:
addRoute(pattern=“api/:handler/:action”,viewNoLayout=“true”,path=“Only.Look.In.This.Path.For.API.Handlers”);

I’ve been up and down this wikipage, but I don’t see this feature or perhaps I’ve got a bad case of TL;DR - http://wiki.coldbox.org/wiki/URLMappings.cfm

You mean to still have the “:handler” part be dynamic but to not have to specify the package in the URL?

Perhaps something like this:
addRoute(pattern=“api/:handler/:action”,viewNoLayout=“true”,package=“site/APIHandlers”);

And then the URL:
mysite.com/api/user/edit

would map to the following handler?
/handlers/site/APIHandlers/user

Whereas, right now you would have to have the following URL:
mysite.com/api/site/APIHandlers/user/edit

OR have the following route:
addRoute(pattern=“api/user/:action”,viewNoLayout=“true”,handler=“site/APIHandlers/user”);

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Correct. You’re following along to exactly what I’m looking for. I don’t see package argument in SES.cfc, so I’m assuming this is a new request? Should I open a ticket?

Yeah this is something that I fell victim too as well.

For example

https://groups.google.com/forum/#!topic/coldbox/YIlvSN3Ybfw

and the replies

https://groups.google.com/forum/#!topic/coldbox/atjvKjLG9qk

If I read you right, but no matter what, you can’t tell it to use a specific handler without it being in the pattern. In my example I had folders in the handlers folder to separate handlers into groups, and I could never figure out how to expose that to the pattern without letting the user know about it.

I am sure I raised a ticket for this, but I am unable to find it so I may not have.