If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

calling external file

I'm a newbie when it comes to Coldfusion and have learned by trail & error, forums and tutorials.

Here's what I'm wanting to achieve:

Our company has a Coldfusion based shopping cart in which our clients order. I set up store fronts for our clients in which their members order our products through. The stores have a "Terms of Agreement" that is sent to our database as well as emailed to the client along with their order receipt.

I'm trying to figure out a way to have the "ToA" in an external document, so I if I need to alter it, I can do it universally rather than have to change it for each store(we have over 300 store fronts).

Hey Tracy. You can keep your Terms of Agreement in a separate file, and then just include it into all of your pages that need it with the <cfinclude> tag.

For example, say that your Terms of Agreement file is termsOfAgreement.cfm, and it is stored in your web root. You could include it into your pages as such:

Code:

<cfinclude template="/termsOfAgreement.cfm">

and the code (or just text) that is in your termsOfAgreement.cfm file will be inserted right into the page where the <cfinclude> tag is.

So you can basically keep your terms of agreement in one place, and just include it everywhere that it is needed. You can also include any plain text file, such as if it were named termsOfAgreement.txt.