Oh boy man...now your just getting too radical. All kidding aside, that's a
really interesting way of looking at the tag and its usefulness.
-----Original Message-----
From: Benjamin Wai [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 10:26 PM
To: Fusebox
Subject: RE: CFSAVECONTENT in CF 5.0
Don't think it will replace cf_bodycontent, but I see there are definately
some uses together with cf_bodycontent, such as, generate contents ahead of
time and re-arrange them for display later on staticly or dynamically. For
example:
<!--- Somewhere in index.cfm --->
<cfsavecontent variable="weatherreport">
...
<cfinclude template="dsp_showweatherreport.cfm">
</cfsavecontent>
<cfsavecontent variable="trafficreport">
...
<cfinclude template="dsp_showtrafficreport.cfm">
</cfsavecontent>
<cfsavecontent variable="todaystask">
...
<cfinclude template="dsp_showtodaystask.cfm">
</cfsavecontent>
<cfsavecontent variable="selectionmenu">
...
<cf_selectionmenu type="main">
</cfsavecontent>
<!--- Now, putting the page together --->
<cf_bodycontent>
<cfoutput>
#selectionmenu#
#todaystask#
#trafficreport#
#weatherreport#
</cfoutput>
</cf_bodycontent>
<cfinclude template="app_layout.cfm">
=== OR ===
<cf_bodycontent>
<cfoutput>
<cfloop query="qUserDisplayPreference">
<cfif IsDefined("#displayitem#")>
#evaluate(displayitem)#
</cfif>
</cfloop>
</cfoutput>
</cf_bodycontent>
<cfinclude template="app_layout.cfm">
One more thought. If we generate these contents and save them to session
variables or even the database for later uses......
---
Benjamin Wai
Project Manager, VelocityHall
Accela.com
701 Gateway Blvd, Suite 151
South San Francisco, CA 94080
* Email: [EMAIL PROTECTED]
* Phone: 650-635 0218 x113
> -----Original Message-----
> From: Mike Craig [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 1:23 PM
> To: Fusebox
> Subject: RE: CFSAVECONTENT in CF 5.0
>
>
> Cool tag, but I don't see how that is a real "replacement" for
> cf_bodycontent. The latter is designed to do more than just trap any
> content generated between its begin and end but rather to process your
> design specifications at the end of the tag. Ultimately wouldn't my
> index.cfm look something like:
>
> <cfsavecontent variable="thispage">
> <cfswitch expression="#attributes.fuseaction#">
> <cfcase>....</cfcase>
> </cfswitch>
> </cfsavecontent>
>
> <cfinclude template="displayers/dsp_header.cfm">
> <cfoutput>#thispage#</cfoutput>
> <cfinclude template="displayers/dsp_footer.cfm">
>
> ?? This is over simplified but how is that really saving me anything?
> Remember I am not against the tag, I think its cool and could use
> it in some
> other places but I don't envision it replacing anything...let me know why
> you think this for my own curiosities sake.
>
> Mike
>
> -----Original Message-----
> From: Erki Esken [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 11:43 AM
> To: Fusebox
> Subject: CFSAVECONTENT in CF 5.0
>
>
> Exciting news!
>
> Something for us fuseboxers, replacement for <cf_bodycontent>. New in
> 5.0beta2:
>
> --------------------------------------------
> CFSAVECONTENT
>
> The cfsavecontent tag saves everything in the body of the cfsavecontent
> tag, including the results of evaluating expressions and executing custom
> tags, in the specified variable. The cfsavecontent tag offers significant
> performance improvements over custom tag solutions.
>
> The following example uses a custom tag to generate a report and saves the
> report in the variable content. It then replaces all instances of the word
> report with the phrase MyCompany Quarterly Report and outputs the result.
>
> <CFSaveContent variable="content">
> <CF_OutputBigReport>
> </CFSaveContent>
> <cfoutput>
> #Replace(content, "report", "MyCompany Quarterly Report", "all")#
> </cfoutput>
> --------------------------------------------
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists