URL Arguments Question

1 view
Skip to first unread message

Justin T

unread,
Apr 4, 2009, 2:58:10 PM4/4/09
to ColdFusion on Wheels
I'm wondering if anyone knows how to access arguments from the URL
*beyond* the first key. For example, I might want something like:

page/list/12/15

Where 'page' is the controller, 'list' is the action, and 12 and 15
are both variables available to the action. As I understand it, the
only value from this URL that would be passed to the 'list' action
would be 12, stored in the variable 'key'.

Any help would be appreciated!

raulriera

unread,
Apr 4, 2009, 3:29:43 PM4/4/09
to ColdFusion on Wheels
Sure, you can use routes for that (routes.cfm)

<cfset addRoute(name="myCustomPageRoute", pattern="pages/list/[var1]/
[var2]", controller="pages", action="list")>

This will enable params.var1 and params.var2 into your action. You can
read more about it here

http://code.google.com/p/cfwheels/wiki/UsingRoutes

There is something to watch out for in a post of mine here in the
groups

http://groups.google.com/group/cfwheels/browse_thread/thread/4dff561fee8662fb?hl=en
Reply all
Reply to author
Forward
0 new messages