Assets
Upload custom CSS, Javascript, Images or Twig files to your store for public access.
Assets allow you to upload your own CSS, Javascript, Images or Twig files to your template, which you can later reference in your files.
To create an asset, first upload it from within the template editor. Once you have uploaded the asset, you can retrieve the public URL of the asset by using theasset()
function. This function will return the full URL of the asset hosted on our global CDN.
For example, you could upload scripts.js
as an asset, and then include it in your template:
You're also able to create TWIG files that you can later reference in your template. For example, you could create an asset called navigation.twig
, and then include it using the Twig include tag:
This allows you to create code that is easily reusable across multiple locations in your template.
Last updated