2022.2

Table Of Contents
l
Expand:Clicktoconvertthescriptgeneratortoaregularscript.Notethatthisactionisnotrevers-
ibleoncetheregularscripthasbeensaved.
Theexpandedscriptwilluseeitherdoubleorsinglequotationmarks,dependingonthePrefer-
ences(Window > Preferences > Scripting;see"Scriptingpreferences"onpage803).
l
Apply:Saveschangesmadetothescriptandappliesthechangesinthetemplatewithoutclos-
ingthedialog.NotethattheeffectwillonlybevisibleonthePreviewtabintheWorkspace.
Expanded Script window
Whenexpanded,theScriptwindowreplacesallpartsofthewizardbelowtheSelectorbyaboxinwhich
thescriptcanbetyped.See"Writingyourownscripts"onpage808.
Foranoverviewofkeyboardshortcutsthatcanbeusedinthisscripteditor,see"Keyboardshortcuts"
onpage953.
Conditional Content script dialog
ConditionalContentscriptscanshoworhideelementsdependingoncertainconditionsandvalues.
Theycanbeaddedbyright-clickinganyelementinatemplateandclickingMake Conditional.Ifthe
currentelementhasneitheranIDnoraclass,anIDwillbeautomaticallygenerated.See"Showingcon-
tentconditionally"onpage734.
ThegeneraloptionsintheConditionalScriptwizardare:
l
Name:Thenameofthescript,makingiteasiertoidentifyit.
l
Selector:TheSelectororTexttoapplytheresultofthescriptto.
l
Selector:UsesCSSselectorstofindtheelementtowhichthescriptapplies.
l
Text:Usestextasatriggerforthescript.Thescriptappliestoallinstancesofthetext
foundinthetemplate.
l
Selector and Text:Usesthespecifiedselectorasatriggerforthescript.Thescript
appliestoallinstancesofthetextfoundwithinthespecifiedSelector.
FormoreinformationaboutSelectorssee"SelectorsinOLConnect"onpage825.
l
Action:Usethedrop-downtoselectwhethertoShoworHidetheelementwhenthecondition
belowistrue.If,conversely,theconditionevaluatestofalse,theoppositeactionwillbeper-
formed.
Aconditionismadeupofgroupsandrules.
The Addbuttonaddsarulethatevaluatesadata fieldtoagroup.
Toaddeitheragroup,orarulethatevaluatesaruntime parameter,clickthedownwardpointing
arrownexttothisbuttonandselectGrouporParameter Rule.
Page 929