2022.2

Table Of Contents
Handlebars in OL Connect
HandlebarsisthenameofaJavaScriptlibrarythatimplementsatemplatinglanguage(see
https://handlebarsjs.com/).Itusesatemplateandaninputobjecttogenerateoutput.
ThetemplatelookslikeregulartextwithembeddedHandlebarsexpressions.Ahandlebarsexpression
issomecontentsenclosedbydoublecurlybraces:{{...}}.Forexample:
<p>Hello {{firstname}}!</p>
Whenthetemplateisrendered,theseexpressionsarereplacedwithvaluesfromaninputobject.
TheHandlebarslibraryisintegratedinOLConnectDesigner.ThismeansthatyoucanuseHandle-
barsexpressionsinallsections(asofversion2022.2),aswellasinaspecialtypeofsnippetscalled
"Handlebarstemplates"(asofversion2022.1).
l
Expressionsinsectionsareresolvedusingthecurrent recordwithwhichatemplateismerged.
Inotherwords,theinputobjectisthecurrentrecord.
l
ExpressionsinaDynamic Tableareresolvedusingthedetail recordassociatedwiththe
closesttablerow.(Nestedtablesaresupported,soasingledynamictablecanusemultipledetail
tables.)
l
InthecaseofHandlebars templates(snippets),youdetermineinascriptwithwhichdatathe
snippetwillbemerged.See"Handlebarstemplates"onpage774forinstructions.
HandlebarstemplatescaninturnuseotherHandlebarstemplatesassnippets.Theyarecalled
partials.Howthisworksisexplainedinthetopic:"Partials"onpage777.
Moreaboutexpressionsandthefunctionsthatyoucanuseinexpressionscanbefoundinthetopics
"Handlebarsexpressions"belowand"Usingfunctionsinexpressions:Helpers"onpage766.
Note: TheinformationinthisOnlineHelpfocusesontheimplementationofHandlebarsinOL
Connect.ForgeneralinformationaboutHandlebarsandhowtouseit,seethefollowingweb
sites:https://handlebarsjs.com/andhttps://devdocs.io/handlebars.
Handlebars expressions
Note: TheinformationinthisOnlineHelpfocusesontheimplementationofHandlebarsinOL
Connect.ForgeneralinformationaboutHandlebarsandhowtouseit,seethefollowingweb
sites:https://handlebarsjs.com/andhttps://devdocs.io/handlebars.
Datainexpressions
Ahandlebarsexpressionissomecontentsenclosedbydoublecurlybraces:{{...}}.
Forexample:Hello {{firstname}}!
Page 763