LogoLogo
  • Welcome
  • Getting Started
  • Integration Methods
  • SDKs
  • Tebex for Unreal Engine 5
  • Tebex for Unity Engine
  • Webstore Builder
    • Overview
    • Getting Started
    • Twig
      • Tags
      • Filters
      • Functions
    • Global Variables
      • basket
      • store
      • page
    • Pages
      • index.html
      • checkout.html
      • username.html
      • options.html
      • package.html
      • cms/page.html
      • category.html
      • layout.html
    • Sidebar Modules
      • module.communitygoal.html
      • module.featuredpackage.html
      • module.giftcardbalance.html
      • module.goal.html
      • module.payments.html
      • module.serverstatus.html
      • module.textbox.html
      • module.topdonator.html
    • Assets
    • Schema
    • Developer Plan
    • Footer
    • Guides
      • Package Slugs
  • Headless API
    • Overview
    • Getting Your Listings
    • Creating a Basket
    • Adding Packages
    • Gifting Packages
    • Applying Discounts / Creator Codes
    • Directing to Checkout
    • Endpoints
    • Postman Config
    • Example Integration
  • Checkout API
    • Overview
    • Headers and Authentication
    • Start the Checkout Process
    • Checkout Webhooks
    • Endpoints
    • Errors
    • Postman Config
  • Tebex.js
    • Overview
    • Integration
    • Events
    • Web Components
    • Custom Render Location
    • NPM
    • GitHub
  • Webhooks
    • Overview
    • Login Webhooks
  • Game Server API
    • Overview
    • Authentication
    • Error Handling
    • Endpoints
  • Affiliate API
    • Overview
    • Referrals
    • Game Types
    • Webhooks
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Webstore Builder

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:

<script defer src="{{ asset('scripts.js') }}"></script>

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:

{% include "navigation.twig" %}

This allows you to create code that is easily reusable across multiple locations in your template.

Previousmodule.topdonator.htmlNextSchema

Last updated 8 months ago

Was this helpful?