Hmm.... having never made a custom tag with an open and close pair, I didn't 
realize that the contained content will display twice.

http://www.mail-archive.com/[email protected]/msg29687.html

No way around this?  It seems pretty stupid that CF wouldn't suppress the 
initial output, leaving the responsibility of displaying the content to the tag.

Mik


At 01:25 PM 11/4/2009, Michael Muller wrote:

>Hey all
>
>I'm trying to make a custom tag for cfmail so I can create a standard From, 
>Subject, and HTML layout inside the email that is sent.
>
>I have created the tag and am using the open / close method, but the content 
>of the email winds up being displayed on the page, as well as being emailed. 
>I'm using THIS.generatedContent inside the custom tag in the body of the 
>cfmail tag, and have even tried wrapping the tag inside a cfsilent.
>
>What am I missing?  How do I stop the body of the custom tag from displaying, 
>or is that not possible.
>
>Mik
>
>
><cf_mailsend to="[email protected]">yadda yadda</cf_mailsend>
>
>====
>
><cfsilent>
><cfswitch expression="#thisTag.ExecutionMode#">
>
><cfcase value="start">
><cfparam name="attributes.to" default="">
></cfcase>
>
><cfcase value="end">
><cfmail to="#trim(attributes.to)#" subject="subject" from="[email protected]" 
>type="HTML">
><div style="padding:20px; margin:20px; border:2px solid blue;">
>#trim(thistag.generatedcontent)#
></div>
></cfmail>
></cfcase>
>
></cfswitch>
><cfsilent>
>
>
>--------
>Michael Muller
>office (413) 863-6455
>cell (413) 320-5336
>skype: michaelBmuller
>http://MontagueWebWorks.com
>
>Information is not knowledge
>Knowlege is not wisdom
>
>Eschew Obfuscation
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328038
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to