{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

Reply via email to