Copy link to clipboard
Copied
I have a directory like this:
-root
-includes
-javascript
-load_states.cfm
-explorer
-tools
-reg_update
-questions_render.cfm
Now i am currently working in questions_render.cfm file, and i want to write a <cfinclude> tag within this file to reference load_states.cfm.
How chould i write the relative path for load_states.cfm?
really thanks!
Copy link to clipboard
Copied
I find absolute paths easier to work with. / puts you at the web root. Then you just follow the path to your file.
I find it odd that you would have a .cfm file in a directory called javascript.
Copy link to clipboard
Copied
Thanks, i've resolved this problem, it looks like this:
<cfinclude template="/includes/javascript/load_states.cfm">
Yes, its not a javscript file but act exactly as a js file. The functionalities are same if you write a js file implements the same logic.
Copy link to clipboard
Copied
Don't forget that you can set up virtual directory mappings at the CF Administrator level.
i.e. set up a mapping for /js_includes/ that points to ROOT/includes/javascript
Which helps when you are dealing with servers that host multiple CF sites. May not be an issue for you.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more