asset.script ViewHelper <vhs:asset.script> 

Basic Script ViewHelper 

Allows inserting a <script> Asset. Settings specify where to insert the Asset and how to treat it.

Arguments 

content 

DataType
string
Required
false
Description
Content to insert in header/footer

path 

DataType
string
Required
false
Description
If not using tag content, specify path to file here

external 

DataType
boolean
Required
false
Description
If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets

name 

DataType
string
Required
false
Description
Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"

overwrite 

DataType
boolean
Default
true
Required
false
Description
If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.

dependencies 

DataType
string
Required
false
Description
CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies

group 

DataType
string
Default
'fluid'
Required
false
Description
Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.

debug 

DataType
boolean
Required
false
Description
If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper

standalone 

DataType
boolean
Required
false
Description
If TRUE, excludes this Asset from any concatenation which may be applied

rewrite 

DataType
boolean
Default
true
Required
false
Description
If FALSE, this Asset will be included as is without any processing of contained urls

fluid 

DataType
boolean
Required
false
Description
If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified

variables 

DataType
mixed
Required
false
Description
An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same

movable 

DataType
boolean
Default
true
Required
false
Description
If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.

trim 

DataType
boolean
Required
false
Description
DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.

namedChunks 

DataType
boolean
Required
false
Description
If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency

async 

DataType
boolean
Required
false
Description
If TRUE, adds "async" attribute to script tag (only works when standalone is set)

defer 

DataType
boolean
Required
false
Description
If TRUE, adds "defer" attribute to script tag (only works when standalone is set)