Monday, October 12, 2009

Getting the app to run

After changing all of the include statements to use absolute paths with the application mapping I created, lo and behold, I was able to login and was properly directed to the landing page.

However, there are a couple of oddities. First, it appears that my css is being overwritten by the cfwheels css. Second, the welcome to wheels message is displaying at the bottom of the page, underneath my content.

This was because I had simply placed the line from the cfwheels index.cfm at the bottom of my original index.cfm. Thus after running all of my code, it ran the cfwheels related code. And since the page I was displaying was index.cfm, it found the matching cfw route, which was to the congratulations page.

What I need is a way to distinguish whether the request was a cfw action or whether it was for the legacy app.

After playing around at displaying cfw pages versus legacy pages, I found that when the request was formatted in the cfw way (index.cfm/:controller/:action), "index.cfm" does not appear in the cgi.path_info. "Index.cfm" does appear in the script name though. So I added a little check at the top of my legacy index.cfm file to run the cfw index page if the situation is as I described above, and if not, run the legacy index.cfm.

Now this is done with limited testing. Since I don't have any cfw forms at this point, I don't know if this will break down when I begin to move my legacy code to cfw.

No comments:

Post a Comment