I think the bodycontent tag changed a bit around the time of the book - if i
remember right, there was an idea to integrate it with the app_layout.cfm,
but then this was dropped.
Maybe.

The cf_bodycontent i use looks like:

<cfif not thistag.HasEndTag>
        <cfset thistag.generatedcontent="">
        You must have an end Tag
        <cfabort>
</cfif>
<cfparam name="attributes.name" default="bodycontent">
<cfif thistag.executionmode is "end">
        <cfset "request.#attributes.name#"=thistag.generatedcontent>
        <cfset thistag.generatedcontent="">
</cfif>


and my index.cfm looks like:

<cfmodule template="bodycontent.cfm">
<cfswitch expression="foo">
    <cfdefaultcase>
         under construction - bookmark this page and come back later
    </cfdefaultcase>
</cfswitch>
</cfmodule>

<cfoutput>
    <blink>#request.bodycontent#</blink>
</cfoutput>

Bert


> -----Original Message-----
> From: John Townsend [mailto:[EMAIL PROTECTED]]
> Sent: 05 April 2001 08:35
> To: Fusebox
> Subject: CF_BODYCONTENT issues
> 

> 
> 
> The CF_BODYCONTENT code is from Nelson & Girard's book
> as follows:
> 
> <cfif not thistag.HasEndTag>
>       <cfset thistag.generatedcontent="">
>       You must have an end Tag
>       <cfabort>
> </cfif>
> 
> <cfparam name="request.headerfile" default="">
> <cfparam name="request.footerfile" default="">
> <cfparam name="attributes.showbody" default="yes">
> <cfif len(request.headerfile)>
>         <cfinclude template="#request.headerfile#">
> </cfif>
> <cfif attributes.showbody>
>         <cfoutput>#request.bodycontent#</cfoutput>
> </cfif>
> <cfif len(request.footerfile)>
>         <cfinclude template="#request.footerfile#">
> </cfif>
> 
> =======
> 
> I've defined the request parameters in as:
> 
> <cfset request.headerfile = "dsp_header.cfm">
> <cfset request.footerfile = "dsp_footer.cfm">
> <cfset request.bodycontent = "bodycontent.cfm">
> 
> any assistance would be greatly appreciated and restore
> sanity.
> 
> John Townsend
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to