cgi.path_info, but Wheels insists on creating the URLs with the query string format), you can override it by setting
On, Partial, or
Off. The line of code should look something like this:
shopis the name of the controller to call, and
productsis the name of the action to call on that controller.
index.cfmpart of the URL so that
http://localhost/shop/products. You can read more about this in the URL Rewriting chapter.
controllers/Shop.cfc) and call the function inside it named
productsfunction could look to make it more clear what goes on:
shopcontroller extends the main Wheels
Controllercomponent. Don't forget to include that
extendsattribute in your
cfcomponentcall as you build your controllers!
action(among others, such as
route), and, based on these, it will try to include a view file. In our case, the view file is stored at
productsfunction with no code whatsoever. What do you think will happen if you just remove that entire function, leaving you with this code?
productsaction and just want the view rendered directly, then you are correct.
views/homefolder and access it at
http://localhost/home/aboutwithout having to create a specific controller and/or action for it, assuming you're still using wildcard routing.
formscopes into one. This is something that most CFML frameworks do as well. In Wheels, it is done in the
paramsstruct is available to you in the controller and view files but not in the model files. (It's considered a best practice to not mix your request handling with your business logic.) Besides the
urlscope variables, the
paramsstruct also contains the current controller and action name for easy reference.
formscopes, the value in the form scope will take precedence.
http://localhost/account/login?sendTo=dashboardwith the variables
passwordpresent in the form. Your
paramsstruct would look like this:
form.username, etc., you can just use the
paramsstruct for all of them instead.
application/jsonas it's mime type.
formscopes are merged, so a valid
params._jsonto follow Rails conventions. (For obvious reasons, we can't merge an array into a struct!)