Commonly used tags in an xml email template

Here's a list of some of the more common fields that we have used in templates.  There are plenty more so if there is a database field that is needed in a mail then just ask.

$matspec.firstInsertion.title
$matspec.firstInsertion.titlenames
$matspec.firstInsertion.itemCategory
$matspec.firstInsertion.placementCode
$matspec.firstInsertion.zone
$matspec.firstInsertion.publishedfrom
$matspec.firstInsertion.publishedto
$matspec.firstInsertion.placement
$matspec.firstInsertion.edition
$matspec.firstInsertion.itemNumber
$matspec.firstInsertion.section

$matspec.name
$matspec.proofContact.email
$matspec.materialDeadline
$matspec.firstInsertionDate
$matspec.allTitlesAsString
$matspec.width.intValue()
$matspec.height.intValue()
$matspec.columns.intValue()
$matspec.colors.intValue()
$matspec.materialContact.email
$matspec.proofContact.email
$matspec.caption
$matspec.productType
$matspec.ad.salesDepartment

And here you can see how to use an 'if' statement to set a variable (in this case we set $logo to be the name of a logo that the customer would want to use in the template):

#if ($matspec.firstInsertion.title.startsWith("FV"))
#set($logo = "FV_logo.png")
#elseif ($matspec.firstInsertion.title.startsWith("SA"))
#set($logo = "SA_logo.png")
#elseif ($matspec.firstInsertion.title.startsWith("BT"))
#set($logo = "BT_logo.jpg")
#elseif ($matspec.firstInsertion.title.startsWith("AP"))
#set($logo = "AP_logo.png")
#elseif ($matspec.firstInsertion.title.startsWith("FAA"))
#set($logo = "FAA_logo.jpg")
#elseif ($matspec.firstInsertion.title.startsWith("LIA"))
#set($logo = "LIA_logo.jpg")
#end

<script>AJS.$('#main-content').after('<div><a onClick="window.scrollTo(0, 0);">Back to top</a></div>');</script>