I just got this on fw1..<https://www.wcl.american....
# fw1
f
I just got this on fw1..https://www.wcl.american.edu/sjd/spp/index.cfm It seems like index,cfm is blank and Application,cfc has all the logic. I have to change only one line in the frontfacing side, but I can't seem to find where it is? Do any of you FW/1 gurus wanna throw me a bon which section I should look in? view or model or do you want to see Appliation.cfc?
s
@Formiko I guess a first question is: do you understand the MVC pattern? (need to know how much to explain to you)
The way MVC frameworks like FW/1 (and ColdBox) tend to work is
index.cfm
is empty and serves purely to satisfy CF's need for a
.cfm
file to act as the basic route for requests -- but the
Application.cfc
(or code that extends it) contains the request lifecycle methods and those route each request to a Controller (a handler function), which uses the parameters from the request to pass to objects/methods in the Model (CFCs that embody the business logic of the app), and then the Controller gathers that data and specifies which View to render, and the framework takes care of rendering that (
.cfm
page) with the supplied data.
So, if the "frontfacing side" you refer to is purely display code, it'll be in a View file, associated with the
event
specified in the URL (or the
/section/item
in the route).
If you mean some sort of "frontend"-related logic, the code might be in the Controller. Otherwise, it's going to be somewhere in the Model.
If you're new to FW/1, you really should read through all the docs https://framework-one.github.io/documentation/ especially the Developing Applications Guide.
As an example of the routing, when you go to the URL you gave, it redirects to https://www.wcl.american.edu/sjd/spp/index.cfm/login/form so the section is
login
and the item is
form
so you'll go to a
login.cfc
Controller and look at the
form
method within it -- unless there's an explicit mapping of the
/login/form
route to some other CFC/method in
Application.cfc
. And then the View would be
views/login/form.cfm
f
Sorry,I was out. Thank you very much. I'll see what I can do with what you told me
👍🙏