BaseTemplate- XpressDox

The BaseTemplate command in XpressDox was developed specifically for letterheads, however far more control can be achieved using the IncludeTemplate function.

Letterheads are of special interest because they are used as the basis for many documents. With XpressDox it is possible to create one letterhead template, and by referring to it with the BaseTemplate command, use that template as the basis for many other documents without having to specify the letterhead formatting in those documents.

A very simple sample letterhead would look like this:

Your reference: «yourref»
Our reference: «ourref»
Date: «date»

«Addressee»
«AddressLine1»
«AddressLine2»

Re: «re»
«DocumentBody»

Per:
«FirmName»
«FeeEarner»

Supposing this template is stored as ‘Letterhead.xdtpx’, then an example of a template using this as the base template, called the ‘source template’, would look like:

«BaseTemplate(Letterhead)»
We note that your account is now overdue by an amount of «BalanceOutstanding».
Please make sure that payment is made forthwith.

Some notes:
a. By default, the entire content of the source template excluding the paragraph containing the BaseTemplate fillpoint will be inserted into the letterhead’s «DocumentBody» fillpoint. The resulting template is called the ‘destination template’.

b. The ‘BalanceOutstanding’ fillpoint in the source template will be included in the destination template. Data elements for all the fillpoints on both the source template and the base template, that is the letterhead, will need to be in the data set for the destination template.

 

Using data element values to construct the base template name

The file name provided to the BaseTemplate command can be built up from constant text and also the contents of data element names.

An example would be «BaseTemplate(LetterHead<PageSize>)»

The data for those data element names (in this example, PageSize) cannot be sourced from data captured in the XpressDox interview, as the command itself is executed before the interview is prepared. The data elements are, then, sourced from the Standard Data which is either in the user’s Home Configuration or in the configuration of the folder from which the main template is being run, as well as the Shared Settings configuration (either the Standard Data or a data source which is designated for use as Standard Data), and also any data sources which are designated “Use for all templates”. Please see the article Configuration for folder settings for information on configuration.

 

Note that it is only sufficient to use BaseTemplate when the letterhead is very simple e.g. when the header does not need to change based on multiple offices. In such instances, far more control is achieved with IncludeTemplate.