Routes and layouts

'morning all,

I’m trying to add a route to my application with no layout. If I add it in Routes.cfm with the following: addRoute(pattern="/api/:handler/:action?/", viewNoLayout=true); or addRoute(pattern="/api/:handler/:action?/, noLayout=true); I’m still getting the layout on the page. I’ve done a fwreinit just to be on the safe side. I know that it’s getting to the correct route I’m just not sure why I’m getting the layout. I can go into the handler for that action and set event.noLayout() and it works - no layout. I want to be able to have/show the layout based on the route. Am I missing something basic here or is this something bigger?

Thanks
Scott

sorry…forgot the conventions, it’s been a while since I posted…it’s [coldbox-4.2.0]

The viewNoLayout parameters only seems to apply if you’re specifying a view right there in your route. It doesn’t look like what you’re wanting is directly possible, but what you can do is add a flag of your own like noLayouy=true which will turn into an rc variable, which you can later check via an interceptor or something and call event.noLayouyt() when necessary].

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

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