2022.2

Table Of Contents
images,see"Images"onpage649.
2. DragthefilethatcontainsthesnippetintotheSnippetsfolderontheResourcespane.
IftheaddedsnippetisnotUTF-8encodedyouwillbeaskedtoselectitsencoding.Thesnippet
willthenbeconvertedandsavedinthetemplateasUTF-8encodedfile.
Tip: Toexportasnippetfromyourtemplate,dragorcopy/pasteitoutoftheSnippetsfoldertoa
folderonthelocalharddrive.
Remotesnippets
AremotesnippetiseitheranHTMLorJSONfilethatisnotlocatedwithinyourtemplatefilebutishos-
tedonaContentManagementSystemorotherexternallocation.
Toaddaremotesnippet:
1. Right-clicktheSnippetsfolderontheResourcespane,andclickNew Snippet>Remote
HTML fileorRemote JSON file.
2. EnteranameforthefileasitappearsintheSnippetsfolder.ThisnameisshownintheSnippets
folderwiththe.rhtmlfileextensionforHTML,or.rjsonforaJSONfile.
3. EntertheURLfortheremoteresource.ThismustbeafullURL,includingthehttp://orhttps://pre-
fix,domainname,pathandfilename.
Note: Remotesnippetsmaycontainotherresources,suchasimages.Thereisonelimitation
though:onlyabsolutepathsaresupportedinsideremotesnippets.Imagesandotherresources
referredtowitharelativepath(forexample:images/img.gif)orroot-relativepath(anypathstart-
ingwithaslash,forexample:/base/images/img.gif)won'tbeavailableinthetemplate.
Note: RemotesnippetsareexpectedtobeUTF-8encoded.
Creating a snippet
Tostartcreatingasnippetfromscratch:
1. OntheResourcespane,right-clicktheSnippetsfolderandselectNew.
2. Selectthetypeofsnippetthatyouwanttocreate:HTMLfile,JSONfileorHandlebars template.
3. Givethesnippetaname.
Tip: ItisalsopossibletocreateanewHTMLsnippetfromanexistingpieceofcontentinthetem-
plate;see"UsingcontenttocreateanHTMLsnippet"onthenextpage.
Page 662