2022.2

Table Of Contents
UnlikeintheoriginalHandlebarslibrary,contentprovidedbyaBlockHelperisnot automatically
HTML-escapedinOLConnect.BlocksaretypicallyusedtogenerateHTML,soitisassumedthatthe
resultconsistsofwell-formedHTML.
Note: IfBlockHelpersareusedinasection,editinginPreviewmodeisnotsupported.Any
changesmadeinPreviewmodearerevertedwhenyouswitchbacktoDesignmode.
Note: Anemptyarrayisconsideredfalsy(i.e.evaluatedasfalse).Thisisnormallynotthecasein
JavaScript,buttheHandlebarslibrarymakesanexception.
Intheloghelper,onlytheinfoerrorlevelissupported.
ThelookuphelperisnotimplementedinOLConnect.
Thedatavariable@keyisnotsupportedinOLConnect.OLConnectonlysupportsiteratingover
arraysandtables,notoverarbitraryobjects.
SincecontentprovidedbyaBlockHelperisnotHTML-escapedinOLConnect,Handlebars'
SafeStringclassisnotneededandthereforenotsupported.
Examples of Block Helpers
#if
Thefollowing#ifblockwilloutputatablerowwithtwocellsifthedatafieldnamedO_L10095isnot
false,undefined,null,0,anemptystring,oranemptyarray.
{{#if O_L10095}}
<tr>
<td>Collective insurance</td>
<td>{{O_L10095}}</td>
</tr>
{{/if}}
#unless and #each
ThefollowingHandlebarstemplateoutputsarowwithaheaderandavariablenumberofclause
descriptions,basedonadetailtablecalled'Clause',unlesstherearenoclauses,inwhichcasetherow
getsaheaderandonecellthatdisplaysthetext'None'.
<table class="policy-table">
<tbody>
{{#unless Clause}}
<tr>
<th class="h3">Clause(s)</th>
<td>None</td>
</tr>
{{else}}
{{#each Clause}}
Page 333