Reputation: 11
So I've began working with .cfm files recently at work, currently my assignment is to modify and update webpages to be more suited to mobile devices and tablets. Now, being relatively new to ColdFusion, I've been having a bit of trouble with how multiple .cfm files are used within a server to create a single webpage. Because of this, I've had issues with finding where specific sections of HTML are located, be it something as where a simple tag is, or where a call to another .cfm, javascript, or .css file may be. Is there anyway to find the origin of certain code without having to skim through hundreds of different files?
Upvotes: 1
Views: 95
Reputation: 1509
If you are working on your code on a local webserver on your computer (i.e. not a production site) then you can enable ColdFusion's debugging output. Documentation for the ColdFusion Administrator debugging options are here: ColdFusion Administrator Debugging
You will want to enable Enable Request Debugging Output
and turn on Report Execution Times
. When you browse to the page, ColdFusion will give you a list of all files that ColdFusion used to render that page (with how long each file took) appended to the bottom of the page.
Otherwise, any good IDE/Editor (CFBuilder, SublimeText, NotePad++ etc) will be able to search across files.
Upvotes: 3
Reputation: 4166
I would suggest downloading the code from your server to a local drive. From there you can search using an IDE (ColdFusion Builder, Dreamweaver, etc) or a good text editor that can search multiple files at once. I personally use ColdFusion Builder 3 and Notepad++.
Multiple cfm files are put together into a single page usually by using the cfinclude
tag, so that would be a good starting point for your search. There are other methods to include different pages into a single page but cfinclude
is probably the most common one. BUT, if the programmer used cfscript instead of cfml, look for the include
function instead.
Adobe documentation on the cfinclude
tag can be found at https://wikidocs.adobe.com/wiki/display/coldfusionen/cfinclude.
Upvotes: 2