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? On 5/29/05, Al Everett <[EMAIL PROTECTED]> wrote: > > So, I want to use a custom tag to standardize my page layouts. Basically I > want all templates that will display to the user to be constructed this way: > > <cf_pagelayout> > <!--- Page Content Goes Here ---> > </cf_pagelayout> > > Here's the (very basic) custom tag I wrote: > > <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> > </cfoutput> > <cfelse> > <cfoutput> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> > <title>#attributes.pageTitle#</title> > </head> > > <body> > #thisTag.GeneratedContent# > </body> > </html> > </cfoutput> > </cfif> > <cfsetting enablecfoutputonly="No"> > > > When I test it with: > > <cf_pagelayout> > This is a test... > </cf_pagelayout> > > The HTML that is generated is: > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > > <html> > <head> > > > This is a test... > > <meta http-equiv="Content-Type" content > ="text/html; charset=utf-8"> > <title>Default Title Text</title> > </head > > > > <body> > > This is a test... > > </body> > > </html> > > > > I am sure it's something simple, but my brain doesn't seem to want to > fully engage. > > -- > Get Firefox! > http://www.spreadfirefox.com/?q=affiliates&id=58370&t=1 -- Get Firefox! http://www.spreadfirefox.com/?q=affiliates&id=58370&t=1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:207978 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

