RE: Capture Output from CFINCLUDE?

2002-01-21 Thread James Ang

{Sent earlier but never appeared on CF-Talk. Converted  to [].}

I guess I should have revealed more. ;)

Like most solutions out there that modularized the look and feel of a
website, there are two CFINCLUDEs to every template that takes care of
encapsulating a script's logic (shielding the programmer from the look
and feel stuff). CFINCLUDE are typically chosen over CFMODULE due to the
lower overhead (since you will be needing the look and feel for almost
all pages).

Now, I want to perform Send this page to a friend kinda thing. The
simplest thing to do is to:

[cfmail ... Blah ...]
  [cfinclude template=top.cfm]
  .. Do other stuff here ..
  [cfinclude template=bottom.cfm]
[/cfmail]

I am not even sure if this works. :) Then, to complicate things, due to
certain requirements that email addresses should be checked for format
correctness (abiding RFC rules), the CFMAIL call is encapsulated within
a custom tag that performs email address syntax/format validation.
Hence, something crude like this happens:

[cf_MySendMail ... Blah ...][cfoutput]
  [cfinclude template=top.cfm]
  .. Do other stuff here ..
  [cfinclude template=bottom.cfm]
[/cfoutput][/cf_MySendMail]

The CFOUTPUT is there to mimic CFMAIL's # behaviors. At the execution of
[/cf_MySendMail], ThisTag.GeneratedContent is used as the content of
CFMAIL. It is also set to empty string AFTER the call to CFMAIL (a la
CFSILENT).

Hence, my dilemma. I do not wish to use CFHTTP as suggested by Bill
Cravens. It is not a scalable solution on a high visibility and high
traffic site. And of course, I have tried CFSAVECONTENT with the two
cfincludes in it but still no go.

Furthermore, modifying the cfincluded template is not an option as it
throws my assigned task out of scope (for now).

If there is no way to do this, then, so be it. I want to know. :)

I hope this clears things up. :)

Thanks.

James Ang
[EMAIL PROTECTED]

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 18, 2002 11:09 AM
To: CF-Talk
Subject: RE: Capture Output from CFINCLUDE?


Are you sure? I ran the exact same code and it ran just fine. Are you
saying that cfsavecontent is being ignored and the output is showing up
anyway? 

Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email: [EMAIL PROTECTED]
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: James Ang [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 18, 2002 1:57 PM
 To: CF-Talk
 Subject: RE: Capture Output from CFINCLUDE?
 
 
 Sorry that I wasn't clear.
 
 I want the generated output produced by whatever code that was in the 
 cfinclude. I am trying to perform a CFSAVECONTENT-like operation on 
 CFINCLUDE files. Doesn't work with CFSAVECONTENT right now
 
 I.e.
 
 cfsavecontent variable=Variables.strCapturedOutput
 cfinclude template=helloworld.cfm
 /cfsavecontent
 
 Does not work.
 
 I want to be able to capture the output and do some nifty stuff to it.

 CFHTTP is not something I would want to try for what I want to do. ;)
 
 James.
 
 -Original Message-
 From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 18, 2002 10:50 AM
 To: CF-Talk
 Subject: Re: Capture Output from CFINCLUDE?
 
 
 more info plz
 
 What do you mean by capture?  If you are doing some processing in an

 included file all the variables that are created should be available 
 to the calling template.
 
 Bryan Stevenson
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 p. 250.920.8830
 e. [EMAIL PROTECTED]
 -
 Macromedia Associate Partner
 www.macromedia.com
 
 - Original Message -
 From: James Ang [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, January 18, 2002 10:42 AM
 Subject: Capture Output from CFINCLUDE?
 
 
  Is it possible to capture the output from an included template?
 
  I have tried CFSAVECONTENT and also tried to wrap the
 cfinclude within
 
  a custom tag and use ThisTag.GeneratedContent but to no avail.
 
  It is not an option to modify the cfincluded file. Nor is
 it an option
 
  to convert it into a cf module. So, all suggestions are welcomed. :)
 
  If it is not possible, please let me know too! :)
 
  Thanks.
 
  James Ang
  [EMAIL PROTECTED]
 
  
 
 

__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Capture Output from CFINCLUDE?

2002-01-21 Thread Steve Oliver

I tried this to test it.

cfmail 
cfinclude template=header.cfm
Body stuff...
cfinclude template=footer.cfm
/cfmail

It works fine, all of the cfml in the header and footer was executed in
the email I received.

Try using another method to validate the email addresses, there are
several custom tags out there, or you could just use regular
expressions.

__
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-Original Message-
From: James Ang [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 21, 2002 1:19 PM
To: CF-Talk
Subject: RE: Capture Output from CFINCLUDE?


{Sent earlier but never appeared on CF-Talk. Converted  to [].}

I guess I should have revealed more. ;)

Like most solutions out there that modularized the look and feel of a
website, there are two CFINCLUDEs to every template that takes care of
encapsulating a script's logic (shielding the programmer from the look
and feel stuff). CFINCLUDE are typically chosen over CFMODULE due to the
lower overhead (since you will be needing the look and feel for almost
all pages).

Now, I want to perform Send this page to a friend kinda thing. The
simplest thing to do is to:

[cfmail ... Blah ...]
  [cfinclude template=top.cfm]
  .. Do other stuff here ..
  [cfinclude template=bottom.cfm]
[/cfmail]

I am not even sure if this works. :) Then, to complicate things, due to
certain requirements that email addresses should be checked for format
correctness (abiding RFC rules), the CFMAIL call is encapsulated within
a custom tag that performs email address syntax/format validation.
Hence, something crude like this happens:

[cf_MySendMail ... Blah ...][cfoutput]
  [cfinclude template=top.cfm]
  .. Do other stuff here ..
  [cfinclude template=bottom.cfm]
[/cfoutput][/cf_MySendMail]

The CFOUTPUT is there to mimic CFMAIL's # behaviors. At the execution of
[/cf_MySendMail], ThisTag.GeneratedContent is used as the content of
CFMAIL. It is also set to empty string AFTER the call to CFMAIL (a la
CFSILENT).

Hence, my dilemma. I do not wish to use CFHTTP as suggested by Bill
Cravens. It is not a scalable solution on a high visibility and high
traffic site. And of course, I have tried CFSAVECONTENT with the two
cfincludes in it but still no go.

Furthermore, modifying the cfincluded template is not an option as it
throws my assigned task out of scope (for now).

If there is no way to do this, then, so be it. I want to know. :)

I hope this clears things up. :)

Thanks.

James Ang
[EMAIL PROTECTED]

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 18, 2002 11:09 AM
To: CF-Talk
Subject: RE: Capture Output from CFINCLUDE?


Are you sure? I ran the exact same code and it ran just fine. Are you
saying that cfsavecontent is being ignored and the output is showing up
anyway? 

Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email: [EMAIL PROTECTED]
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: James Ang [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 18, 2002 1:57 PM
 To: CF-Talk
 Subject: RE: Capture Output from CFINCLUDE?
 
 
 Sorry that I wasn't clear.
 
 I want the generated output produced by whatever code that was in the
 cfinclude. I am trying to perform a CFSAVECONTENT-like operation on 
 CFINCLUDE files. Doesn't work with CFSAVECONTENT right now
 
 I.e.
 
 cfsavecontent variable=Variables.strCapturedOutput
 cfinclude template=helloworld.cfm
 /cfsavecontent
 
 Does not work.
 
 I want to be able to capture the output and do some nifty stuff to it.

 CFHTTP is not something I would want to try for what I want to do. ;)
 
 James.
 
 -Original Message-
 From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 18, 2002 10:50 AM
 To: CF-Talk
 Subject: Re: Capture Output from CFINCLUDE?
 
 
 more info plz
 
 What do you mean by capture?  If you are doing some processing in an

 included file all the variables that are created should be available
 to the calling template.
 
 Bryan Stevenson
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 p. 250.920.8830
 e. [EMAIL PROTECTED]
 -
 Macromedia Associate Partner
 www.macromedia.com
 
 - Original Message -
 From: James Ang [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, January 18, 2002 10:42 AM
 Subject: Capture Output from CFINCLUDE?
 
 
  Is it possible to capture the output from an included template?
 
  I have tried CFSAVECONTENT and also tried to wrap the
 cfinclude within
 
  a custom tag and use ThisTag.GeneratedContent but to no avail.
 
  It is not an option to modify the cfincluded file. Nor is
 it an option
 
  to convert it into a cf module. So, all suggestions are welcomed. :)
 
  If it is not possible, please let me know too

Capture Output from CFINCLUDE?

2002-01-18 Thread James Ang

Is it possible to capture the output from an included template?

I have tried CFSAVECONTENT and also tried to wrap the cfinclude within a
custom tag and use ThisTag.GeneratedContent but to no avail.

It is not an option to modify the cfincluded file. Nor is it an option
to convert it into a cf module. So, all suggestions are welcomed. :)

If it is not possible, please let me know too! :)

Thanks.

James Ang
[EMAIL PROTECTED]

__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Capture Output from CFINCLUDE?

2002-01-18 Thread Bryan Stevenson

more info plz

What do you mean by capture?  If you are doing some processing in an included file 
all the
variables that are created should be available to the calling template.

Bryan Stevenson
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
p. 250.920.8830
e. [EMAIL PROTECTED]
-
Macromedia Associate Partner
www.macromedia.com

- Original Message -
From: James Ang [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, January 18, 2002 10:42 AM
Subject: Capture Output from CFINCLUDE?


 Is it possible to capture the output from an included template?

 I have tried CFSAVECONTENT and also tried to wrap the cfinclude within a
 custom tag and use ThisTag.GeneratedContent but to no avail.

 It is not an option to modify the cfincluded file. Nor is it an option
 to convert it into a cf module. So, all suggestions are welcomed. :)

 If it is not possible, please let me know too! :)

 Thanks.

 James Ang
 [EMAIL PROTECTED]

 
__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Capture Output from CFINCLUDE?

2002-01-18 Thread James Ang

Sorry that I wasn't clear.

I want the generated output produced by whatever code that was in the
cfinclude. I am trying to perform a CFSAVECONTENT-like operation on
CFINCLUDE files. Doesn't work with CFSAVECONTENT right now

I.e.

cfsavecontent variable=Variables.strCapturedOutput
cfinclude template=helloworld.cfm
/cfsavecontent

Does not work.

I want to be able to capture the output and do some nifty stuff to it.
CFHTTP is not something I would want to try for what I want to do. ;)

James.

-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 18, 2002 10:50 AM
To: CF-Talk
Subject: Re: Capture Output from CFINCLUDE?


more info plz

What do you mean by capture?  If you are doing some processing in an
included file all the variables that are created should be available to
the calling template.

Bryan Stevenson
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
p. 250.920.8830
e. [EMAIL PROTECTED]
-
Macromedia Associate Partner
www.macromedia.com

- Original Message -
From: James Ang [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, January 18, 2002 10:42 AM
Subject: Capture Output from CFINCLUDE?


 Is it possible to capture the output from an included template?

 I have tried CFSAVECONTENT and also tried to wrap the cfinclude within

 a custom tag and use ThisTag.GeneratedContent but to no avail.

 It is not an option to modify the cfincluded file. Nor is it an option

 to convert it into a cf module. So, all suggestions are welcomed. :)

 If it is not possible, please let me know too! :)

 Thanks.

 James Ang
 [EMAIL PROTECTED]

 

__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Capture Output from CFINCLUDE?

2002-01-18 Thread Bryan Stevenson

OK..well like I said the output that is created in the included  file is available to 
the calling
template, so just reference the vars created in the included file and do your nifty 
stuff to them.
It looks like you're making this process more complicated than it needs to bebut 
mabye I'm
missing something ;-)

Bryan Stevenson
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
p. 250.920.8830
e. [EMAIL PROTECTED]
-
Macromedia Associate Partner
www.macromedia.com

- Original Message -
From: James Ang [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, January 18, 2002 10:56 AM
Subject: RE: Capture Output from CFINCLUDE?


 Sorry that I wasn't clear.

 I want the generated output produced by whatever code that was in the
 cfinclude. I am trying to perform a CFSAVECONTENT-like operation on
 CFINCLUDE files. Doesn't work with CFSAVECONTENT right now

 I.e.

 cfsavecontent variable=Variables.strCapturedOutput
 cfinclude template=helloworld.cfm
 /cfsavecontent

 Does not work.

 I want to be able to capture the output and do some nifty stuff to it.
 CFHTTP is not something I would want to try for what I want to do. ;)

 James.

 -Original Message-
 From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 18, 2002 10:50 AM
 To: CF-Talk
 Subject: Re: Capture Output from CFINCLUDE?


 more info plz

 What do you mean by capture?  If you are doing some processing in an
 included file all the variables that are created should be available to
 the calling template.

 Bryan Stevenson
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 p. 250.920.8830
 e. [EMAIL PROTECTED]
 -
 Macromedia Associate Partner
 www.macromedia.com

 - Original Message -
 From: James Ang [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, January 18, 2002 10:42 AM
 Subject: Capture Output from CFINCLUDE?


  Is it possible to capture the output from an included template?
 
  I have tried CFSAVECONTENT and also tried to wrap the cfinclude within

  a custom tag and use ThisTag.GeneratedContent but to no avail.
 
  It is not an option to modify the cfincluded file. Nor is it an option

  to convert it into a cf module. So, all suggestions are welcomed. :)
 
  If it is not possible, please let me know too! :)
 
  Thanks.
 
  James Ang
  [EMAIL PROTECTED]
 
 

 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Capture Output from CFINCLUDE?

2002-01-18 Thread Billy Cravens

Use CFHTTP

- Original Message -
From: James Ang [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, January 18, 2002 12:42 PM
Subject: Capture Output from CFINCLUDE?


 Is it possible to capture the output from an included template?

 I have tried CFSAVECONTENT and also tried to wrap the cfinclude within a
 custom tag and use ThisTag.GeneratedContent but to no avail.

 It is not an option to modify the cfincluded file. Nor is it an option
 to convert it into a cf module. So, all suggestions are welcomed. :)

 If it is not possible, please let me know too! :)

 Thanks.

 James Ang
 [EMAIL PROTECTED]

 
__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Capture Output from CFINCLUDE?

2002-01-18 Thread Raymond Camden

Are you sure? I ran the exact same code and it ran just fine. Are you
saying that cfsavecontent is being ignored and the output is showing up
anyway? 

===
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email: [EMAIL PROTECTED]
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: James Ang [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, January 18, 2002 1:57 PM
 To: CF-Talk
 Subject: RE: Capture Output from CFINCLUDE?
 
 
 Sorry that I wasn't clear.
 
 I want the generated output produced by whatever code that was in the
 cfinclude. I am trying to perform a CFSAVECONTENT-like operation on
 CFINCLUDE files. Doesn't work with CFSAVECONTENT right now
 
 I.e.
 
 cfsavecontent variable=Variables.strCapturedOutput
 cfinclude template=helloworld.cfm
 /cfsavecontent
 
 Does not work.
 
 I want to be able to capture the output and do some nifty stuff to it.
 CFHTTP is not something I would want to try for what I want to do. ;)
 
 James.
 
 -Original Message-
 From: Bryan Stevenson [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, January 18, 2002 10:50 AM
 To: CF-Talk
 Subject: Re: Capture Output from CFINCLUDE?
 
 
 more info plz
 
 What do you mean by capture?  If you are doing some processing in an
 included file all the variables that are created should be 
 available to
 the calling template.
 
 Bryan Stevenson
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 p. 250.920.8830
 e. [EMAIL PROTECTED]
 -
 Macromedia Associate Partner
 www.macromedia.com
 
 - Original Message -
 From: James Ang [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, January 18, 2002 10:42 AM
 Subject: Capture Output from CFINCLUDE?
 
 
  Is it possible to capture the output from an included template?
 
  I have tried CFSAVECONTENT and also tried to wrap the 
 cfinclude within
 
  a custom tag and use ThisTag.GeneratedContent but to no avail.
 
  It is not an option to modify the cfincluded file. Nor is 
 it an option
 
  to convert it into a cf module. So, all suggestions are welcomed. :)
 
  If it is not possible, please let me know too! :)
 
  Thanks.
 
  James Ang
  [EMAIL PROTECTED]
 
  
 
 
__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists