Calls an asset from the CDN


[%cdn_asset type:'js' html:'1' version:'4.4.0' library:'skeletal' domain:''%]example.js[%/cdn_asset%]

Output result

<script type="text/javascript" src="//"></script>


The CDN asset tag will load either a CSS file or a JS file from a location based on specificed parameters

cdn_asset parameters

Name Options Description
type:'' css, js Dictates whether the created tag will be a script tag or link tag
html:'' 1 / 0 A boolean that when true (1) will print script OR link tag depending on the type, while false (0) will print a link
domain:'' URL Uses // as a default, this determines the base domain to load the asset from. Beginning http: OR https: will be removed if they are in the domain. Ending backslashes ('/') will also be removed.
library:'' String The third last section in the URL, this is not required.
version:'' String The second last section in the URL, this is not required.
variable:'' String The file name of the requested resource

Was this article useful?

Be notified when this page is updated. Optional.