2022.2

Table Of Contents
AddinganHTMLsnippettoasection
Drag-and-drop
ToaddanHTMLsnippettothecontentofasection,dragthesnippetfromtheSnippetsfolderonthe
Resourcespanetothedesiredlocationinasection.
ChecktheoptionInsert as shared contenttoinsertareferencetotheoriginalsnippetinthetem-
plate,ratherthanacopyoftheoriginalsnippet.
Via a script
Inadditiontothedrag-and-dropmethod,itispossible,andoftenuseful,toinsertasnippetorpartofit,
usingascript;forremotesnippetsthisisnormalpractice.See"Loadingasnippetviaascript"on
page831.
Editingasnippet
Toeditasnippet,openthesnippetfilebydouble-clickingitontheResourcespane.
Editing shared content
Bydefault,anHTMLsnippetthatisbeingusedassharedcontentcanalsobemodifiedinasection
whereitisused.Thatwayyouactuallyadjustitssource.Thesnippetwillbechangedatalllocations
whereitisused.
Theoptiontomodifysharedcontentsnippetsfromwithinasectioncanbeturnedoff:
l
Inthemenu,selectView > Shared Content Editingtoenableordisableeditingofallshared
content.
l
Toenableordisableeditingonacasebycasebasis,youcanalsomanuallysetthecon-
tenteditableattributeontheArticleelementofthesharedcontenttotrueorfalse.This
overridesthemenusetting.
Note: RemotesnippetsinsertedassharedcontentcannotbechangedfromwithintheDesigner.
Ofcourse,theirsourcefilecanbeeditedoutsideoftheDesigner.Whenthathappens,the
changeswillbecomevisibleinremotesnippetsthatareinsertedassharedcontent.
Renamingasnippet
Torenameasnippet,right-clickitontheResourcespaneintheSnippetsfolderandselectRename.
Ifyourenameasnippetthatwasinsertedintoasectionassharedcontent,youneedtoupdatetheref-
erencetothesnippetmanually:
Page 664