<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brontoversity &#187; dynamic code</title>
	<atom:link href="http://brontoversity.com/tag/dynamic-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://brontoversity.com</link>
	<description>Product Education for Bronto's Email Marketing Application</description>
	<lastBuildDate>Thu, 29 Jul 2010 18:57:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>No Data? No Problem. Using Dynamic Content To Handle Empty Tags</title>
		<link>http://brontoversity.com/2010/06/03/no-data-no-problem-using-dynamic-content-to-handle-empty-tags/</link>
		<comments>http://brontoversity.com/2010/06/03/no-data-no-problem-using-dynamic-content-to-handle-empty-tags/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 19:37:53 +0000</pubDate>
		<dc:creator>John Gunther</dc:creator>
				<category><![CDATA[Did You Know?]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[dynamic code]]></category>
		<category><![CDATA[Dynamic Content]]></category>
		<category><![CDATA[field tag]]></category>
		<category><![CDATA[personalization]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=7598</guid>
		<description><![CDATA[
Placing Field Tags in your messages is a great way to use existing contact data to create more personalized messages. However, sometimes you don&#8217;t have certain data for contacts in your account. Without this data, the tags will be replaced with no content. Obviously, this can create problems and be a blemish on an otherwise [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/10/29/cracking-the-dynamic-content-code/' rel='bookmark' title='Permanent Link: Cracking The Dynamic Content Code'>Cracking The Dynamic Content Code</a> <small>We recently blogged about our new Dynamic Content feature introduced...</small></li>
<li><a href='http://brontoversity.com/2009/10/22/the-logical-way-to-send-email-dynamic-content/' rel='bookmark' title='Permanent Link: The Logical Way To Send Email: Dynamic Content'>The Logical Way To Send Email: Dynamic Content</a> <small>We have been blogging a lot in recent weeks about...</small></li>
<li><a href='http://brontoversity.com/2010/03/16/adding-blocks-of-re-editable-dynamic-content/' rel='bookmark' title='Permanent Link: Adding Blocks Of Re-Editable Dynamic Content'>Adding Blocks Of Re-Editable Dynamic Content</a> <small>In the past, the only way for you to edit...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/06/No-Name-Road-on-Flickr-Photo-Sharing.png"><img style="float: right; padding: 5px 5px 5px 5px;" title="No Name Road on Flickr - Photo Sharing!" src="http://brontoversity.com/wp-content/uploads/2010/06/No-Name-Road-on-Flickr-Photo-Sharing.png" alt="" width="194" height="322" /></a></p>
<p>Placing <a href="http://brontoversity.com/2009/06/16/getting-personal-with-your-contacts/" target="_new">Field Tags</a> in your messages is a great way to use existing contact data to create more personalized messages. However, sometimes you don&#8217;t have certain data for contacts in your account. Without this data, the tags will be replaced with no content. Obviously, this can create problems and be a blemish on an otherwise flawless email.</p>
<h3>Tell Me More</h3>
<p>Let&#8217;s start off with an example. Let&#8217;s say at the top of your message you have the following salutation:</p>
<p>Dear <code>%%firstname%%</code>,</p>
<p>When the message is sent, <code>%%firstname%%</code> will get replaced with the value stored for the contact in the <em>firstname</em> field. However, if there is no value in the <em>firstname</em> field for the contact, the salutation will read &#8220;Dear ,&#8221;. Not only does this look bad, but it ruins the personalized feel of the message and leads your contacts to believe that grammar was a sour point for you in school!</p>
<h3>Dynamic Content To The Rescue!</h3>
<p>To prevent this little mishap from occurring, you can make use of Dynamic Content. We could remedy the issue in the example above by doing the following:</p>
<ol>
<li>Click <strong>Insert Dynamic Content</strong> on the WYSIYG editor toolbar.</li>
<li>Select the options shown in the screen shot below from the Edit Dynamic Content window.</li>
<li>Click <strong>Insert Raw Dynamic Code</strong> or <strong>Insert Re-Editable Dynamic Content</strong>.</li>
<p><a href="http://brontoversity.com/wp-content/uploads/2010/06/Bronto-Editing-Message_-Ds-Dc-mF-mFL-mFlink-BN-mT-cF-MSL-Survey-HF-1.png" target="_new"><img style="float: left; padding: 5px 5px 5px 5px;" title="Bronto - Editing Message_ Ds, Dc, mF, mFL, mFlink, BN, mT, cF, MSL, Survey, H&amp;F-1" src="http://brontoversity.com/wp-content/uploads/2010/06/Bronto-Editing-Message_-Ds-Dc-mF-mFL-mFlink-BN-mT-cF-MSL-Survey-HF-1.png" alt="" width="531" height="333" /></a>
</ol>
<p>Basically this works by checking to see if the <em>firstname</em> field is blank. If it is, then the text &#8220;Valued Customer&#8221; is used. If the <em>firstname</em> field for the contact has a value, then the value is used. For those of you familiar with <a href="http://brontoversity.com/2009/10/29/cracking-the-dynamic-content-code/" target="_new">Dynamic Code</a>, the complete code for the salutation would look something like this:</p>
<p><code>Dear {dynamic_code}{if $Contact.firstname eq ""}{literal}Valued Customer{/literal}{else}{literal}%%firstname%%{/literal}{/if}{/dynamic_code}</code></p>
<p>A contact with no value in the <em>firstname</em> field would see &#8220;Dear Valued Customer&#8221;, whereas a contact with a value in their <em>firstname</em> field would see &#8220;Dear John Doe&#8221; (where John Doe is the value in the <em>firstname</em> field for the contact).</p>
<p>So now you have an easy way to handle instances when there is no data in Field Tags you use in your messages. Feel free to leave any questions or comments in the comments section below.</p>
<p><em>John Gunther<br />
Technical Writer/eLearning Specialist at Bronto<br />
Editor of Brontoversity</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/10/29/cracking-the-dynamic-content-code/' rel='bookmark' title='Permanent Link: Cracking The Dynamic Content Code'>Cracking The Dynamic Content Code</a> <small>We recently blogged about our new Dynamic Content feature introduced...</small></li>
<li><a href='http://brontoversity.com/2009/10/22/the-logical-way-to-send-email-dynamic-content/' rel='bookmark' title='Permanent Link: The Logical Way To Send Email: Dynamic Content'>The Logical Way To Send Email: Dynamic Content</a> <small>We have been blogging a lot in recent weeks about...</small></li>
<li><a href='http://brontoversity.com/2010/03/16/adding-blocks-of-re-editable-dynamic-content/' rel='bookmark' title='Permanent Link: Adding Blocks Of Re-Editable Dynamic Content'>Adding Blocks Of Re-Editable Dynamic Content</a> <small>In the past, the only way for you to edit...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/06/03/no-data-no-problem-using-dynamic-content-to-handle-empty-tags/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cracking The Dynamic Content Code</title>
		<link>http://brontoversity.com/2009/10/29/cracking-the-dynamic-content-code/</link>
		<comments>http://brontoversity.com/2009/10/29/cracking-the-dynamic-content-code/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 19:59:54 +0000</pubDate>
		<dc:creator>Adam Covati</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[dynamic code]]></category>
		<category><![CDATA[Dynamic Content]]></category>
		<category><![CDATA[dynamic preview]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=5258</guid>
		<description><![CDATA[We recently blogged about our new Dynamic Content feature introduced in the Fall 2009 Release. I&#8217;d like to give you a bit more detail on one aspect of Dynamic Content: Dynamic Code.
Just a warning, this blog post will be looking at code. It&#8217;s simple code, nothing crazy. However, if HTML makes you queasy, then I [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/10/22/the-logical-way-to-send-email-dynamic-content/' rel='bookmark' title='Permanent Link: The Logical Way To Send Email: Dynamic Content'>The Logical Way To Send Email: Dynamic Content</a> <small>We have been blogging a lot in recent weeks about...</small></li>
<li><a href='http://brontoversity.com/2010/03/16/adding-blocks-of-re-editable-dynamic-content/' rel='bookmark' title='Permanent Link: Adding Blocks Of Re-Editable Dynamic Content'>Adding Blocks Of Re-Editable Dynamic Content</a> <small>In the past, the only way for you to edit...</small></li>
<li><a href='http://brontoversity.com/2010/02/16/previewing-your-dynamic-content/' rel='bookmark' title='Permanent Link: Previewing Your Dynamic Content'>Previewing Your Dynamic Content</a> <small>One of the marketing tools that we are most proud...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img style="float:right;padding:5px;" title="Morse Code" src="http://brontoversity.com/wp-content/uploads/2009/10/morse-code.png" alt="Morse Code" width="120" />We recently blogged about our new <a title="The Logical Way To Send Email: Dynamic Content" href="http://brontoversity.com/2009/10/22/the-logical-way-to-send-email-dynamic-content/" target="_blank">Dynamic Content</a> feature introduced in the <a title="Fall 2009 Release Info" href="http://brontoversity.com/2009/10/05/fall-2009-release-is-here/" target="_blank">Fall 2009 Release</a>. I&#8217;d like to give you a bit more detail on one aspect of Dynamic Content: <strong>Dynamic Code</strong>.</p>
<div style="border: 1px solid #bbbbbb; margin: 10px; padding: 5px; background: #ddeeff none repeat scroll 0% 0%; width: 375px;">Just a warning, this blog post will be looking at code. It&#8217;s simple code, nothing crazy. However, if HTML makes you queasy, then I suggest taking a pass instead.</div>
<p>Whenever you create Dynamic Content within Bronto, we actually insert Dynamic Code into your message. If you feel comfortable around basic coding, such as javascript, then you now have a new tool at your disposal.</p>
<p><img class="aligncenter size-full wp-image-5260" title="Dynamic Code sample" src="http://brontoversity.com/wp-content/uploads/2009/10/dynamic-code-sample.png" alt="Dynamic Code Sample" /></p>
<p>As you can see above, there are several different elements at play here. We start things out with a <code>dynamic_code</code> block. Everything inside of here will be considered part of this Dynamic Code. This is an area where you have to be careful. Any changes to the basic structure of the code will affect what output people receive. As with any type of code, <strong>it&#8217;s also possible to break Dynamic Code</strong>. So please be careful when editing it.</p>
<p><img class="aligncenter size-full wp-image-5262" title="Dynamic Code Conditionals" src="http://brontoversity.com/wp-content/uploads/2009/10/dynamic-code-conditionals.png" alt="Dynamic Code Conditionals" /></p>
<p>Inside a Dynamic Code block you will find some form of conditional, that&#8217;s the <code>if</code> and later on the <code>else</code>. Bronto also has an <code>elseif</code> available to users. This structure is completed with a closing <code>/if</code>. These are comparable to conditionals available in most other programming languages. In Bronto&#8217;s Dynamic Code, all of these special terms are enclosed in curly braces &#8211; that just makes sure we don&#8217;t accidentally confuse some of your text for a conditional.</p>
<p><img class="aligncenter size-full wp-image-5263" title="Dynamic Code Content" src="http://brontoversity.com/wp-content/uploads/2009/10/dynamic-code-content.png" alt="Dynamic Code Content" /> Within Dynamic Code, you will enclose any actual content within <code>literal</code> tags. This tells Bronto to view this <strong>literally as content</strong>, not as Dynamic Code. Inside of those tags, you can have any html you wish. If you are using the WYSIWYG editor you can also click within this area and drop in images, special text, tables, or anything else you need.</p>
<h3>So Now what?</h3>
<p>Alright, so you understand the basics of how Dynamic Code works. If you play around with the Dynamic Code Wizard, you can check out all the available functions that can be used within an <code>if</code> or <code>elseif</code>.</p>
<p>You can then take that code and put it into a template or drop it into a message that you are creating via the API. You may also find that writing the code yourself will provide a bit more flexibility than using the wizard. At the very least, you now have the ability to tweak your Dynamic Content as you go, speeding up any edits you need to make. So try it out.</p>
<h3>Don&#8217;t Forget To Test!</h3>
<p>As with any Dynamic Code you create, it&#8217;s important to check how it looks. Once you have made changes to your Dynamic Code, you should look at the preview. We have added an option in the Fall 2009 Release that allows you to personalize previews to a specific contact.</p>
<p><img class="aligncenter size-full wp-image-5281" title="Preview a message as..." src="http://brontoversity.com/wp-content/uploads/2009/10/preview-as.png" alt="Preview a message as..." width="359" height="132" /></p>
<p>You can select which contacts are available for preview on the individual contact pages. I suggest you select yourself and some other colleagues, then alter your data and list membership in order to see how your content looks with different data. This is also useful for testing out personalization.</p>
<p>So check out the new Dynamic Code feature and start delivering a better, more dynamic experience for your contacts.</p>
<p><em>Adam Covati<br />
Product Manager at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/10/22/the-logical-way-to-send-email-dynamic-content/' rel='bookmark' title='Permanent Link: The Logical Way To Send Email: Dynamic Content'>The Logical Way To Send Email: Dynamic Content</a> <small>We have been blogging a lot in recent weeks about...</small></li>
<li><a href='http://brontoversity.com/2010/03/16/adding-blocks-of-re-editable-dynamic-content/' rel='bookmark' title='Permanent Link: Adding Blocks Of Re-Editable Dynamic Content'>Adding Blocks Of Re-Editable Dynamic Content</a> <small>In the past, the only way for you to edit...</small></li>
<li><a href='http://brontoversity.com/2010/02/16/previewing-your-dynamic-content/' rel='bookmark' title='Permanent Link: Previewing Your Dynamic Content'>Previewing Your Dynamic Content</a> <small>One of the marketing tools that we are most proud...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/10/29/cracking-the-dynamic-content-code/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
