Asset.module ViewHelper <f:asset.module>

ViewHelper to add JavaScript modules to the TYPO3 AssetCollector.

Examples

<f:asset.module identifier="@my/package/filename.js"/>
Copied!

Details

In the AssetCollector, the "identifier" attribute is used as a unique identifier. Thus, if modules are added multiple times using the same module identifier, the asset will only be served once.

Go to the source code of this ViewHelper: Asset\ModuleViewHelper.php (GitHub).

Arguments

The following arguments are available for the asset.module ViewHelper:

identifier

identifier
Type
string
Required
1
Bare module identifier like "@my/package/filename.js".