Developers Tessitura Community
  • Topical Tessitura Community Groups
  • More
Developers Tessitura Community
Community Docs Wiki Tips for writing HTML Templates
  • Discussions
  • Community Docs Wiki
  • Events
  • Files
  • Members
  • Mentions
  • Tags
  • More
  • Cancel
  • New
Developers Tessitura Community requires membership for participation - click to join
  • +Community Developer Documentation
  • Browser-based custom screen auth token API authentication
  • Deploying network ticket printers via Windows Group Policy
  • -HTML Templates
    • Show Information from a Custom Data Service
    • Show information from a custom stored procedure
    • Tips for writing HTML Templates
  • +Impresario Database
  • List Filters in Custom Reports
  • New to Using Tessitura in a Software Developer Role? Start here!
  • SSRS Report Open Detail Window Links
  • The Secret Life of HTML Templates
  • +TNEW Customizations
  • Understanding Contributions endpoints in the REST Services

Tips for writing HTML Templates

Here are some tips for writing and managing HTML Templates in Tessitura. These tips work as of version 15.

Make your own backups

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.

Some advice:

  • Never edit an existing template directly. Instead, duplicate the original to a new name and work on it there. Copy your changes back into the original once you are sure they work
  • Make your own copies of template documents before – and during – the editing process by copying everything in the Template tab and pasting it somewhere else.
    • If you have a version-controlled code repository this would be a perfect place to save copies of your templates and work-in-progress
    • Even if you don't, saving your own copies of your templates before major changes is almost certainly a good idea.

Inspect contents of a Model or data object

Use the following snippet to show the contents of a data object in JSON format. This lets you find out what fields are available.

This example shows the contents of anObject. It works best if you wrap the statement in <pre></pre> tags.

<pre>
	@Raw(Newtonsoft.Json.JsonConvert.SerializeObject(
		@anObject,
		Newtonsoft.Json.Formatting.Indented
	));
</pre>

  • razor
  • Share
  • History
  • More
  • Cancel
Related
Recommended