2022.2

Table Of Contents
youneedtousethatstructure,forexampleinHTML:<imgsrc="images/signatures/johnsmith.gif">.In
scripts,youcanrefertotheminthesameway,forexample:
results.loadhtml("snippets/en/navbar.html");
Seealso:"Loadingasnippetviaascript"onpage831and"Writingyourownscripts"onpage808.
Note: WhenreferringtoimagesorfontsfromaCSSfile,youneedtorememberthatthecurrent
pathiscss/,meaningyoucan'tjustcallimages/image.jpg.Usearelativepath,forexample:
#header{background-image:url('../images/image.jpg');}
External resources
Externalresourcesarenotstoredinthetemplate,butonthelocalharddriveoronanetworkdrive.
Theyareaccessedusingapath.Thepathmusthaveforwardslashes,forexample
<img src="file:///c:/resources/images/signatures/johnsmith.gif">
or
var json_variables = loadjson("file:///d:/jsondata/variables.json");.
Thecompletesyntaxis:file://<host>/<path>.Ifthehostis"localhost",itcanbeomitted,asitisinthe
example,resultinginfile:///<path>.Theemptystringisinterpretedas`themachinefromwhichthe
URLisbeinginterpreted'.
Networkpathsaresimilar:results.loadhtml("file://servername/sharename/folder/snippet.html");(note
thatinthiscasefileisfollowedby2slashesonly).
Some limitations
l
Stylesheetscannotrefertoexternalresources.
l
TheConnectServeruserneedsaccesstowhichevernetworkpathisused.Ifthenetworkpathis
onadomain,theConnectServermustbeidentifiedwithdomaincredentialsthathaveaccessto
thedomainresources.
Formoreinformationonnetworkpaths,pleaseseethisWikipediaentry:fileURIscheme.
Web resources
WebresourcesaresimplyaccessedusingafullURL.ThisURLneedstobepubliclyaccessible:ifyou
typeinthatURLinabrowserontheserver,itneedstobevisible.Authenticationispossibleonly
Page 428