> Seems I found the solution.

> <cfset thisTag.GeneratedContent=""> before exiting the
> ExecutionMode block
> for the end tag.

> Anyone else use this kind of technique have any tips?

Well yes and no... given the way you plan to use it, I wouldn't expect
you to need to set thistag.generatedcontent to an empty string -- or
to output the value of thistag.generatedcontent anywhere in the tag...
I'd expect this instead:

<cfsetting enablecfoutputonly="Yes">

<cfif NOT thisTag.HasEndTag>
        <cfthrow message="cf_pagelayout requires an end tag.">
        <cfexit method="EXITTAG">
</cfif>

<cfparam name="attributes.pageTitle" default="Default Title Text">

<cfif thisTag.ExecutionMode is "start">
        <cfoutput>
                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

                <html>
                <head>
                <meta http-equiv="Content-Type" content="text/html; 
charset=utf-8">
                <title>#attributes.pageTitle#</title>
                </head>

                <body>
        </cfoutput>
<cfelse>
        <cfoutput>
                </body>
                </html>
        </cfoutput>
</cfif>

<cfsetting enablecfoutputonly="No">

What you had before just seems ... strange ... that it would check the
executionmode and then in the "start" area output from the doctype to
some random location in the middle of the header and then include a
random portion of the header along with the body in the end portion...


The only question this brings up is will you need to add other content
to the head section of the page, and if so, how will you accomodate
those additions? You might consider a sub-tag using <cfassociate> --
there is of course always the <cfhtmlhead> tag -- though I've had bad
luck with it, so I stay away from it...

s. isaac dealey     954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207982
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to