2022.2

Table Of Contents
Note: Beforeyoucanaddvariabledatafieldstothecontentsofyourtemplateyouneedtoload-
orcreate-aDataModel(see"DataModelpane"onpage972),adatamappingconfiguration,
ordatafromadatafileordatabase(see"Loadingdata"onpage710).
Note: Webtemplatesarepersonalizedjustlikeanyothertemplate.Thereareafewextrapos-
sibilities,though;see"UsingvariabledataonaWebpage"onpage499.
Howtopreventemptylinesandextraspaces
Youcaninsertplaceholdersandcreatetheaccompanyingscriptsviathedrag-and-dropordouble-
clickmethod,orusingawizard.
Thedrag-and-dropordouble-clickmethodisbestforsimplefieldsthatdonotneedtobeprecededor
followedbyaspace,linebreakortext.
Arethereemptyfieldsinthedata?Andisthevalueofadatafieldprecededorfollowedbyaspace,line
breakortextinthetemplate?Thenitisbettertouseawizard.Otherwise,emptydatafieldswillcause
emptylinesandsuperfluouswhitespacestoshowupinthetext.Youshouldalsousethismethodfor
blocksofdata,suchasaddressblocks.Thewizardmakesiteasytoformatdatadifferently,for
example,displayanumberasacurrency.
Bothmethodsaredescribedindetailbelow.
Insertingplaceholdersviadrag-and-drop/double-click
Aneasy,quickanddirectwaytoinsertplaceholdersforvariabledatainthecontentisviadrag-and-
droporadouble-click.
1. Openthesectionyouwanttoaddthedatafieldto.
2. Either:
l
Drag and dropadatafieldfromtheData Modelpaneatthebottomrightintothecontent
ofyourtemplate.Toselectandinsertmultipledatafieldsatthesametime,pressShiftor
Ctrl,whilstselectingfieldsintheDataModelpane.
Tip: PresstheCtrlkeywhiledraggingtowraptheplaceholder(s)inanabsoluteposi-
tionedbox(adiv)atthecursorposition.Eachplaceholderinsidetheboxiswrapped
inaSpan,andeachSpangetsitsownclass.
ThismethodisparticularlyusefulwhenthedocumentmainlyconsistsofaPDFused
asthebackgroundimageofasection(see"UsingaPDFfileorotherimageasback-
ground"onpage451).
Page 727