#INSERT
Syntax
#INSERT(Content Type, Unique Identifier[, Template[, ...]])
Parameters
- Content Type - The content type of the object to insert.
- Unique Identifier - A value or field=value pair to uniquely identify the content object to insert. If a single value is provided, it will be matched against the first Unique/Key field of the content type (or the OID if no Unique/Key field exists). If a field=value pair is given, the specified Unique/Key field of the content type will be matched to the specified value.
- Template - Optional identifier associated with a template of the specified content type. If this parameter is not specified, the "default" template will be used. It is common to leave this parameter empty to use the default template, even if there are following parameters. If no Template is specified or named default, the first template defined will be used.
- ... - Optional list of additional parameters that are passed to the specified template as variables ($A for the first, $B for the second, $C for the third, and so on).
Description
#INSERT processes and outputs a template in the context of an object that matches the specified content type and unique value. If a Content Type contains more than one object with the same unique value, the object closest to the Publication Content Folder will be used.
Related
#INCLUDE is similar to #INSERT, except that it inserts content from the file system or a URL.
Example
Process and output the Image Content Type's HTML template in the context of the Logo Image, and pass 'Alternate Text' in to the HTML template as $A.
#INSERT(Image, Logo, HTML, 'Alternate Text')