Channel
Channel is an enumeration for the output channels. The active output channel
is registered in merge.channel .
The channel doesn't change when the output consists of different . When generating email, for example, the channel is EMAIL, even when merging the Print to attach it to the email.
EMAIL |
The merge request is for output to Email. |
PRINT |
The merge request is for output to Print. |
WEB |
The merge request is for output to Web. |
THUMBNAIL |
The merge request is for generating a template preview. |
Example
The following Control Script selects different for Print output and for Email with the Print context attached to it. var printSections = merge.template.contexts.PRINT.sections;
if(merge.channel === Channel.EMAIL){
printSections['Section 1'].enabled = false;
printSections['Section 2'].enabled = true;
}
if(merge.channel === Channel.PRINT){
printSections['Section 1'].enabled = true;
printSections['Section 2'].enabled = false;
}
|
|