Sections and resources in a document definition published in Composition Center are accessed by
$docdef references in the Template Engine template.
If you, in your Template Engine template, want to access a resource (text or image) in a document definition you must specify the name of the section that contains the resource as well as the name of the resource itself. Use the following syntax:
Images can be embedded in HTML output as base64 encoded data. To base64 encode images in a Template Engine template you must use the
toBase64() function. For example:
If the output is intended for email delivery, you can let Template Engine generate attachments for text and image resources in a document definition. To attach a resource to an email you must use the
toAttachment() function. For example:
This allows you to, for example, reference attached images and have them displayed in the email body, instead of base64 encoding and embedding the images.
See toAttachment() for more information. See also
$attachments.addAttachment for information about how to attach a file, referenced by a URI, to an email.
Docdef references are case sensitive. For example, $docdef.MySection and
$docdef.mysection are not references to the same section. If the document definition contains the section
MySection, and you use
$docdef.mysection to reference this section, an error is generated.
If a document definition has section names and resource names that contain white space you must use
{object name} to reference the section/resource. For example, if a document definition contains the text resource
Welcome Text in the section
Greetings you must use
$docdef.Greetings.{Welcome Text} to reference the text resource.
Document definitions based on Template Engine Processes can be used in Ad Hoc Correspondence. The purpose is to generate documents with dynamic areas that can be edited by an Ad Hoc Correspondence user. The Ad Hoc Correspondence user can change the content of dynamic areas as follows: