Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-05-2010, 04:55 PM   PM User | #1
ratchez
New to the CF scene

 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ratchez is an unknown quantity at this point
calling external file

Hello All,

New to the forums here and I hope someone may be able to help me.

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).

Any suggestions on the best way to achieve this would be fantastic!

Thanks!
Tracy
ratchez is offline   Reply With Quote
Old 03-06-2010, 07:36 AM   PM User | #2
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
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.

Hope that helps.

-Greg
Gjslick is offline   Reply With Quote
Old 03-06-2010, 02:17 PM   PM User | #3
ratchez
New to the CF scene

 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ratchez is an unknown quantity at this point
Thanks Greg!

I'll give it a whirl when I get back in the office on Monday and let you know how it goes.

Again, thanks for the quick response!
ratchez is offline   Reply With Quote
Old 03-08-2010, 09:58 PM   PM User | #4
ratchez
New to the CF scene

 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ratchez is an unknown quantity at this point
Hey Greg,

Just wanted to let you know that everything worked. Thanks again for your help!

Tracy
ratchez is offline   Reply With Quote
Old 03-08-2010, 10:16 PM   PM User | #5
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
Hey Tracy, glad that everything worked out

Let me know if you need anything else!

-Greg
Gjslick is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:07 PM.


Advertisement
Log in to turn off these ads.