2022.2

Table Of Contents
Accessing runtime parameters
Runtimeparametersinatemplateareaccessibleinscripts,viamerge.template.parameters.
(See"StandardScriptAPI"onpage1169.)
Themerge.templateobjecthasaparametersarraythatallowstoaccessthetemplate'sruntime
parameters.(See:"template"onpage1292.)Thescriptcanreadandcouldalsochangethevalues.
Notehoweverthatanyruntimeparameter'svaluewillberesetwitheachnewrecordthatthetemplateis
beingmergedwith.
Contexts
Contextsarepartsofatemplatethatareeachusedtogenerateaspecifictypeofoutput:Web,Emailor
Print.
l
ThePrintcontextoutputsdocumentstoeitheraphysicalprinteroraPDFfile;see"Printcontext"
onpage443.
l
TheEmailcontextoutputsHTMLemail,composedofHTMLcodewithembeddedCSS.See
"Emailcontext"onpage478.
l
TheWebcontextoutputsanHTMLwebpage.See"WebContext"onpage496.
Whenanewtemplateismade,theContextappropriatetothatnewtemplateisautomaticallycreated,
includingonesection.Afteratemplatehasbeencreated,theothertwocontextscanbeaddedtoit;see
"Addingacontext"onthefacingpage.
Tip: WhenyouaddanEmailcontexttoanexistingtemplateyougeta'basicactionemail'.Thisis
oneofthe4typesofemailthatyoucanchoosefromwhenyoustartatemplatewithanEmail
TemplateWizard;see"CreatinganEmailtemplatewithaWizard"onpage475.
Outputtingandcombiningcontexts
Allcontextscanbepresentinanytemplateandtheycanallbeusedtooutputdocuments;see"Gen-
eratingEmailoutput"onpage1340,"GeneratingPrintoutput"onpage1316and"GeneratingWebout-
put"onpage1348.
Theycanevenbecombinedinoutput.
Ifpresentinthesametemplate,aPrintcontextandaWebcontextcanbeattachedtoanEmailcontext.
YoucouldselectPrintsectionsbasedonavalueinthedatawithaConditionalPrintSectionsscript;
see"ConditionalPrintsections"onpage738.
Outputtingothercombinationsofcontexts,andselectingothersectionsbasedonavalueinthedata,
canbedoneviaaControlScript;see"ControlScripts"onpage838.
Page 431