This content has been marked as final. Show 6 replies
That is documented behavior of a custom tag. The code is run once at
the opening of the tag "<cf_marketingcolumn>" and once at the closing of
the tag "</cf_marketingcolumn>".
That is the purpose of the thistag.executionmode property. It allows
you to designate when a given piece of the custom tag should be run.
The code you have outside your if block is going to be run both times
the custom tag is called.
This is throughly explained with examples in the documentation. If you
do not have one the internet does.
[Stolen from I forget who without permission]
there is no code outside my if block.
there is only one place I output my generatedContent, and that's between the divs in the attached code. And that's in the if block. Also you'll note the output shows the code inside the if block is only run once, but the generated content is thrown in above it.
> there is code outside my if block.
And that code will be run twice as it is supposed to be. If you do not
want it to be you need to use the features and functionality that allow
you to control this behavior.
sorry, I was coming to edit,
"there is code outside my if block." = "there isn't code outside my if block."
There is NO code outside my if block
Also even if this were an issue of running things in start and end mode, when exectutionmode is "start" generatedContent is an empty string, so foo wouldn't even be showing up!
That's very strange that it wasn't a problem in CFMX 7, but that it is now a problem in CFMX 8. Could be a bug...
Have you tried removing the <cfexit method="exittag" />?
I don't see why that's necessary anyways...
Perhaps since you're prematurely short circuiting the tag with <cfexit>, the supression of the "inner" content is disabled. Just a thought.
add cfexit is just a habit, for when I make tags that end <cf_foo /> like that so they dont run twice