Base Tag Library
Note: We have updated our folder structure in Neto 6 and this has not been updated on all tweaks yet. More info.

cdn_asset

Calls an asset from the CDN

Example

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

Output result

<script type="text/javascript" src="//www.google.com/skeletal/4.4.0/example.js"></script>

Usage

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

cnd_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 //cdn.neto.com.au/assets/neto-cdn 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