Routing Methods
Inline Terminator
route( "/wiki:pagename", "wiki.page" );
route(
pattern="/users/:id/profile",
target="users:profile.show",
name="userprofile"
);Inline Response
route(
pattern="/echo",
response=function( event, rc, prc ){
return "hello ColdBox!";
}
);
route(
pattern="/users",
response=function( event, rc, prc ){
return getInstance( "UserService" ).list();
}
);Routing to Events
to EventsRouting To Handler Action Combinations
Routing to Views
Routing to Redirects
Routing to Handlers
Routing to RESTFul Actions
Routing to Responses
Sub-Domain Routing
Adding Variables to RC/PRC
Routing Conditions
Last updated
Was this helpful?