2021.2

Table Of Contents
l The year script changes the year in the conditional paragraph to the current year. This
script only has to look for @year@ in an element that has the ID 'promo', instead of in the
entire letter, which makes it run faster.
l The Dynamic Signature script switches the signature, with a file name based on a data
field. (See: "Dynamic images" on page823.)
l The sender's address is adjusted depending on where the customer lives. The two
different sender's addresses are saved in snippets. (See: "Loading a snippet via a script"
on page904.)
Styling is done via CSS. The context_all_styles.css file contains style rules for certain HTML
elements (level 1 and 2 headings) and for elements with a certain class or ID.
The data mapping
The data with which the template is merged come from an XML file: Sample Data.xml. They
are extracted from the XML file with a data mapping configuration: , made with the DataMapper
module in the Designer.
The data mapping configuration is very straightforward. It extracts all data without modifications
and it does no pre- or post-processing. Simple data mapping configurations like this are made
with the XML Data Mapping Wizard (see: "Using the wizard for XML files" on page212). The
wizard creates a configuration with only one step: the Extract All step.
Of course, this will only work with the appropriate data files. This data mapping configuration
was designed for XML files that are structured like this file: Sample Data.xml.
The sample file is located in the Configurations\Data folder, but you will also see it when you
open the data mapping configuration itself: select File > Open from the menu; browse to the
Configurations\Resources folder and select the data mapping configuration: PR_PROM Data
XML.
Print settings
The Print context and Print sections can have their own print settings, such as Duplex printing
or binding style (see "Print settings in the Print context and sections" on page484). But in this
template, they don't have any. The way the letter is outputted is determined (mostly) by an
Output Creation Preset.
The Project Wizard installs six Output Creation Presets; two for each type of output. Per output
type, all settings in the Output Creation Presets are the same, except one: Print Virtual
Stationery. The ones that have this option enabled will include the Media - the Virtual
Page 157