Zid Themes Docs
  • Getting started
  • Twig reference
  • Theme file structure
  • zid-theme package
  • Theme Templates and Data
    • layout.twig
  • Store language and currency
  • Home template modules
  • Product template
  • Cart template
  • Settings Schema
    • text
    • number
    • textarea
    • select
    • radios
    • checkbox
    • checkboxes
    • range
    • color
    • image
    • product
    • category
    • category products
    • list
    • fieldset
  • Data reference
    • locals
    • store
    • cart
    • product
    • products list
    • category
    • categories list
    • session
    • customer
    • faqs
    • blogs
    • blog
    • page
    • main menu
    • request
    • orders
    • addresses
    • store payment methods
    • store shipping methods
    • store banks
    • asset_url
    • header_meta_tags
  • Zid-api Library
    • Product
    • Category
    • Cart
    • Blog
    • Customer
    • Settings
  • Upload themes and more
Powered by GitBook
On this page

Was this helpful?

  1. Data reference

asset_url

Previousstore banksNextheader_meta_tags

Last updated 4 years ago

Was this helpful?

All the asset files uploaded in the asset folder can be accessed through the asset_url variable (checkout for more information)

example:

<link href="{{ asset_url ~ 'style.css' }}" rel="stylesheet" />
<body>

    <div class="app">
     <img src="{{ asset_url }}image.png" alt="" />   
    </div>

   <script src="{{ asset_url ~ 'main.js' }}"></script>
</body>

{{ asset_url ~ 'style.css' }} is a way of concatenating two strings in Twig

Theme File Structure