2022.2

Table Of Contents
Dynamic partials
Toloadpartialsdynamically,basedondata,youcoulduseablockhelper(see"Usingfunctionsin
expressions:Helpers"onpage766and"UsingHandlebarstemplates:examples"onpage777).
Itisalsopossibletodynamicallyselectapartialbyusingasub expressionbetweenparentheses.The
subexpressionshouldevaluatetothenameofapartial.
Forexample,ifwhichPartialisafunctionthatreturnsthenameofapartial,{{> (whichPartial)
}}inaHandlebarstemplatecallswhichPartialandthenrendersthepartialwhosenameisreturned
bythisfunction.
Notethattouseafunctioninthisway,itmustberegisteredasaHelper.See"CreatingcustomHelp-
ers"onpage771.
Inline partials
Inlinepartialsaresupportedaswell.Seethetwoexamplesathttps://-
docs.w3cub.com/handlebars/partials#inline-partials.
Unsupportedfeatures
ThefollowingHandlebarspartialsfeaturesarenotsupportedinOLConnect.
l
Passingacustomcontextasaparameter.
l
Passinghashparameters(seehttps://devdocs.io/handlebars/partials#partial-parameters).
Styling and formatting
IntheDesigneryouhaveeverythingathandtomakeyourtemplateslookgood:colors,fontsandallthe
toolstoposition,alignandembellishelementsinyourdesigns.Thistopicinformsaboutthewaysto
styleatemplate.
Local formatting versus style sheets
Thereareingeneraltwowaystostyleelements:
l
Usinglocal formatting.Localformattingmeansstylinganelementdirectly,usingatoolbarbut-
tonoroneoftheformattingdialogs.
l
UsingCascading Style Sheets(CSS).Stylesheetscandeterminetheappearanceofindividual
elements,aswellastheappearanceofelementsthathavethesameclassorHTMLtag.
Whetherappliedthroughstylesheetsorthroughlocalformatting,behindthescenesalllayoutprop-
ertiesintheDesignerareCSSproperties.Whenyouformatanelementlocally,aninlinestyleruleis
addedtotheelement.
Page 671