By referencing thisTag.generatedContent, you could possibly do what you 
want.

This is taking the following for granted:

1) Start tag is <cf_myTag>
2) Body of tag is [in between start and end]
3) End tag is </cf_myTag>

By setting thisTag.generatedContent to "" i.e: Nothing, then what you 
have in between will not be written out. That doesnt mean it wont be 
executed though.

I would set an attribute to determine when you need to output and when 
not to.

Therefore:

<cfparam name="attributes.executeBody" default="true">

<cfif thisTag.executionMode EQ "Start">
    <!-------------Always skip cause generated content insnt available 
until end of tag---------------------->
<cfelse>
    Perform your work
    <cfif NOT attributes.executeBody>
          <cfset thisTag.generatedContent="">
    </cfif>
</cfif>

holds through.

Dan.

Barney Boisvert wrote:

>I want to execute the start tag, then OPTIONALLY execute the body of
>the tag, and then execute the close tag.  thistag.executionmode will
>only tell me which part of the tag (opening or closing) is currently
>execution, and doesn't tell me anything about the body of the tag.
>
>As near as I can tell, this is impossible with CF (though trivial with JSP).
>
>cheers,
>barneyb
>
>On 8/24/05, Snake <[EMAIL PROTECTED]> wrote:
>  
>
>><cfif thistag.executionmode is "end">
>>Do this
>></cfif>
>>
>>Will only do anything on the closing tag.
>>
>>
>>-----Original Message-----
>>From: Barney Boisvert [mailto:[EMAIL PROTECTED]
>>Sent: 24 August 2005 18:34
>>To: CF-Talk
>>Subject: Re: Stupid custom tag question
>>
>>Whoops, I screwed up.  I want to skip the body, but still execute the
>>closing tag.  So that should be method="goToJustBEFOREClosingTag".
>>Not sure what I was thinking.  To complete the thought, method="exittag"
>>does what I described below, but that's NOT what I want.
>>
>>On 8/24/05, Barney Boisvert <[EMAIL PROTECTED]> wrote:
>>    
>>
>>>Is there a way to, in the opening tag of a custom tag, tell the custom
>>>tag to skip evaluation of it's body?
>>>
>>><p:mytag>
>>>  i don't want to do this
>>></p:mytag>
>>>
>>>mytag.cfm:
>>><cfif this.executionMode EQ "start">
>>>  <cfexit method="goToJustAfterClosingTag" /> </cfif>
>>>
>>>Thanks,
>>>barneyb
>>>
>>>--
>>>Barney Boisvert
>>>[EMAIL PROTECTED]
>>>360.319.6145
>>>http://www.barneyb.com/
>>>
>>>Got Gmail? I have 50 invites.
>>>
>>>      
>>>
>>--
>>Barney Boisvert
>>[EMAIL PROTECTED]
>>360.319.6145
>>http://www.barneyb.com/
>>
>>Got Gmail? I have 50 invites.
>>
>>
>>
>>
>>    
>>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:216229
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