global_ asset_ url
string | global_asset_url
returns string
Returns the CDN URL for a global asset.
Global assets are kept in a directory on Shopify's server. Using global assets can be faster than loading the resource directly.
Depending on the resource type, you might need to use an additional filter to load the resource. The following table outlines which filter to use for specific resource types.
The following table outlines the available global assets:
Category | Assets |
---|---|
Firebug | -
-
-
-
-
-
-
|
JavaScript libraries | - controls.js - dragdrop.js - effects.js - ga.js - mootools.js |
Lightbox | - lightbox.css - lightbox.js -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
Prototype | - prototype.js -
-
|
script.aculo.us | -
-
-
-
-
-
-
-
|
Shopify | - list-collection.css - textile.css |
{{ 'lightbox.js' | global_asset_url | script_tag }}
{{ 'lightbox.css' | global_asset_url | stylesheet_tag }}
{{ 'lightbox.js' | global_asset_url | script_tag }}
{{ 'lightbox.css' | global_asset_url | stylesheet_tag }}
Output
<script src="//polinas-potent-potions.myshopify.com/cdn/s/global/lightbox.js" type="text/javascript"></script>
<link href="//polinas-potent-potions.myshopify.com/cdn/s/global/lightbox.css" rel="stylesheet" type="text/css" media="all" />
Was this page helpful?