An open source ColdFusion framework
created in the spirit of Ruby on Rails.
created in the spirit of Ruby on Rails.
Today, I released a chapter in the Documentation called Using Routes.
Routes are a pretty cool feature of Wheels because they let you step outside of the URL convention that can sometimes feel like shackles.
As I outline in the new chapter, you can create a URL like this:
http://www.domain.com /user/johndoe
With this line of code in your config/routes.cfm file:
Read on to find out how it all works.
Comments
[Add Comment]
# Posted By Raul Riera | 10/18/08 8:13 PM
http://www.domain.com/news/1/story/5
instead of
http://www.domain.com/news/story/5
I think there should be an ID for the news right?
# Posted By Raul Riera | 10/18/08 8:14 PM
No, the format I have is correct.
Match this...
http://www.domain.com/news/story/5
To this...
http://www.domain.com/controller/action/id
And you get this...
controller = news
action = story
id = 5
That is the default route for Wheels.
# Posted By Chris Peters | 10/18/08 8:37 PM
# Posted By Chris Peters | 10/18/08 8:39 PM
# Posted By Raul Riera | 10/18/08 9:10 PM
[Add Comment]