Unfortunately, that's how it works.  Every custom tag instance gets an
output stream (thistag.generatedContent) that it outputs to, and then
after the end tag is done, the contents of that variable are injected
into the parent's output stream.  What happens is that when the text
is written to the output stream, it goes through a filter and if
ENABLECFOUTPUTONLY is set true and the content isn't inside a
CFOUTPUT, then the it doesn't actually get written to the stream. 
It's kind of weird how it all works, and the nitty gritty is very
nitty and gritty, but it's just the way things work, and it's probably
not going to change.

If you're really concerned, you might be able to use CFSETTING inside
a custom CFSAVECONTENT (untested code):

<cfif thistag.executionMode EQ "start">
  <cfparam name="attributes.variable" type="string" />
  <cfsetting enablecfoutputout="false" />
<cfelse>
  <cfsetting enablecfoutputout="true" />
  <cfset caller[attributes.variable] = thistag.generatedContent />
  <cfset thistag.generatedContent = "" />
</cfif>

Of course, that's not going to consider the case where
ENABLECFOUTPUTONLY is not enabled, but you can probably figure out a
way to deal with that (do a test CFSAVECONTENT and see if it works).

cheers,
barneyb

On 1/19/06, Russ <[EMAIL PROTECTED]> wrote:
> Well with cfsavecontent I'm not asking it to output to the html stream, just
> into a variable.
> > -----Original Message-----
> > From: Barney Boisvert [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, January 19, 2006 3:07 PM
> > To: CF-Talk
> > Subject: Re: cfsavecontent bug?
> >
> > CFMAIL never gets to the stage where you can have CFSETTING
> > ENABLECFOUTPUTONLY affect it, since the body of the tag is never
> > output to the HTML stream.  So there's no way to tell if it has an
> > implicit CFOUTPUT in there, or if it just evaluates hash-encased
> > expressions like CFOUTPUT does.
> >
> > cheers,
> > barneyb
> >
> > On 1/19/06, Russ <[EMAIL PROTECTED]> wrote:
> > > Well that's what we've had to do, but maybe it's me, but somehow I
> > expected
> > > there to be an implicit cfoutput as part of cfsavecontent, sort of like
> > > cfmail...
> > >
> >
> > --
> > Barney Boisvert
> > [EMAIL PROTECTED]
> > 360.319.6145
> > http://www.barneyb.com/
> >
> > Got Gmail? I have 100 invites.
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230036
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to