ScriptHelperRegisterScriptFile Method |
Registers the client script and adds a script file reference to the page.
Allows to explicitly disable script minification.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 8.2.23
Syntax public static void RegisterScriptFile(
PageElement element,
string url,
bool minify = true
)
Parameters
- element
- Type: CMS.BasePageElement
Page element - url
- Type: SystemString
The URL or name of the script file. If only name is provided, the file from ~/CMSScripts/ is taken. It is also possible to input URLs like "Controls/uniselector.js" to access subfolders. - minify (Optional)
- Type: SystemBoolean
True if minification should be used, otherwise false
See Also