<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communitytest.tessitura.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Tips for writing HTML Templates</title><link>https://communitytest.tessitura.com/topical_groups/developers/w/community-developer-documentation/800/tips-for-writing-html-templates</link><description>Wiki for creating community documentation.</description><dc:language>en-US</dc:language><generator>Telligent Community 12 Non-Production</generator><item><title>Tips for writing HTML Templates</title><link>https://communitytest.tessitura.com/topical_groups/developers/w/community-developer-documentation/800/tips-for-writing-html-templates</link><pubDate>Mon, 05 Dec 2022 05:04:30 GMT</pubDate><guid isPermaLink="false">fd08b0f2-65fa-4b2b-916a-cce3e88b61d0:26ceb1f2-6ebe-451d-bb91-c2d8f18649e0</guid><dc:creator>James Murty</dc:creator><comments>https://communitytest.tessitura.com/topical_groups/developers/w/community-developer-documentation/800/tips-for-writing-html-templates#comments</comments><description>Current Revision posted to Community Docs Wiki by James Murty on 12/5/2022 5:04:30 AM&lt;br /&gt;
&lt;p&gt;Here are some tips for writing and managing HTML Templates in Tessitura. These tips work as of version 15.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:200%;"&gt;Make your own backups&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Tessitura does not create back-ups of HTML Templates, so you must do this yourself if you want to keep a history of changes and guard against accidentally breaking your emails.&lt;/p&gt;
&lt;p&gt;Some advice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Never edit an existing template directly. Instead, duplicate&amp;nbsp;the original to a new name and work on it there. Copy your changes back into the original once you are sure they work&lt;/li&gt;
&lt;li&gt;Make your own copies of template documents before &amp;ndash; and during &amp;ndash; the editing process by copying everything in the Template tab and pasting it somewhere else.
&lt;ul&gt;
&lt;li&gt;If you have a version-controlled code repository this would be a perfect place to save copies of your templates and work-in-progress&lt;/li&gt;
&lt;li&gt;Even if you don&amp;#39;t,&amp;nbsp;saving your own copies of your templates before major changes is almost certainly a good idea.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:200%;"&gt;Inspect contents of a Model or data object&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Use the following snippet to&amp;nbsp;show the contents of a data object in JSON format. This lets you find out what fields are available.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;This example shows the contents of &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;anObject&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;.&amp;nbsp;It works best if you wrap the statement in &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;/span&gt; tags.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;pre class="ui-code" data-mode="html"&gt;&amp;lt;pre&amp;gt;
	@Raw(Newtonsoft.Json.JsonConvert.SerializeObject(
		@anObject,
		Newtonsoft.Json.Formatting.Indented
	));
&amp;lt;/pre&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: razor&lt;/div&gt;
</description></item><item><title>Tips for writing HTML Templates</title><link>https://communitytest.tessitura.com/topical_groups/developers/w/community-developer-documentation/800/tips-for-writing-html-templates/revision/1</link><pubDate>Mon, 05 Dec 2022 05:04:11 GMT</pubDate><guid isPermaLink="false">fd08b0f2-65fa-4b2b-916a-cce3e88b61d0:26ceb1f2-6ebe-451d-bb91-c2d8f18649e0</guid><dc:creator>James Murty</dc:creator><comments>https://communitytest.tessitura.com/topical_groups/developers/w/community-developer-documentation/800/tips-for-writing-html-templates#comments</comments><description>Revision 1 posted to Community Docs Wiki by James Murty on 12/5/2022 5:04:11 AM&lt;br /&gt;
&lt;p&gt;Here are some tips for writing and managing HTML Templates in Tessitura. These tips work as of version 15.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:200%;"&gt;Make your own backups&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Tessitura does not create back-ups of HTML Templates, so you must do this yourself if you want to keep a history of changes and guard against accidentally breaking your emails.&lt;/p&gt;
&lt;p&gt;Some advice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Never edit an existing template directly. Instead, duplicate&amp;nbsp;the original to a new name and work on it there. Copy your changes back into the original once you are sure they work&lt;/li&gt;
&lt;li&gt;Make your own copies of template documents before &amp;ndash; and during &amp;ndash; the editing process by copying everything in the Template tab and pasting it somewhere else.
&lt;ul&gt;
&lt;li&gt;If you have a version-controlled code repository this would be a perfect place to save copies of your templates and work-in-progress&lt;/li&gt;
&lt;li&gt;Even if you don&amp;#39;t,&amp;nbsp;saving your own copies of your templates before major changes is almost certainly a good idea.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:200%;"&gt;Inspect contents of a Model or data object&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Use the following snippet to&amp;nbsp;show the contents of a data object in JSON format. This lets you find out what fields are available.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;This example shows the contents of &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;anObject&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;.&amp;nbsp;It works best if you wrap the statement in &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;/span&gt; tags.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;pre class="ui-code" data-mode="html"&gt;&amp;lt;pre&amp;gt;
	@Raw(Newtonsoft.Json.JsonConvert.SerializeObject(
		@anObject,
		Newtonsoft.Json.Formatting.Indented
	));
&amp;lt;/pre&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: razor&lt;/div&gt;
</description></item></channel></rss>