Adds an url to the 'javascriptinclude' placeholder.

Syntax

Smartsite SXML CopyCode image Copy Code
placeholder.addjavascriptinclude(locator url)
placeholder.addjavascriptinclude(locator url, boolean defer)
placeholder.addjavascriptinclude(locator url, boolean defer, integer priority)
placeholder.addjavascriptinclude(locator url, boolean defer, integer priority, enum aim)
placeholder.addjavascriptinclude(locator url, boolean defer, integer priority, enum aim, enum aimOptions)

Parameters

Name Data Type Description
url Locator The URL of the file or item.
defer Boolean If set to true, script execution is deferred until page is ready.
priority Integer Priority for sorting the results.
aim Enum The AIM settings.
Enum values:
  • Off
    No AIM scan.
  • Normal
    Automatically determine the source, meaning that relations are added to the actual rendered page being rendered.
  • Autonomous
    Forces Autonomous registration of the relation as a relation of the source item itself, even if the source is a Translation or a RenderTemplate.
aimOptions Enum The aim relation options. Default: automatically determined.
Enum values:
  • Auto
    Automatic determine AIM link type.
  • Softlink
    Soft link.
  • Hardlink
    Hard link.

Return Value

None.

Expand image Example

SXML