Zid Docs
AppsThemes
Payments
AppsThemes
Payments
Help Center
Slack
  1. Building with Vitrin
  • Getting Started
    • Introduction
    • Theme Development
    • Vitrin Changelog
    • Creating and Managing Theme Presets
    • Legacy Theme Migration
      • Store Settings Mapping
      • Moving to Vitrin Using LLMs
      • Twig to Jinja
      • Breaking Changes
  • Key Concepts
    • Architecture
    • Templates
      • Overview
      • Overridable Templates
      • Legacy Templates
      • Template Replacements
      • Templates Library
        • home.jinja
        • product.jinja
        • cart.jinja
        • category.jinja
        • products.jinja
        • categories.jinja
        • page.jinja
        • blogs.jinja
        • blog.jinja
        • faqs.jinja
        • reviews.jinja
        • questions.jinja
        • shipping_payment.jinja
        • 404_not_found.jinja
    • Settings
      • Schema files
      • Input Settings
      • Media Settings
      • Form Controls Settings
      • Products Settings
      • Additional Settings
      • Conditional Visibility
      • Migrating twig settings schema
    • Localization
      • localization (jinja v. twig)
    • Theme Editor
      • Overview
  • Building with Vitrin
    • Jinja Basics
    • Vitrin's Jinja Extensions
  • Vitrin CLI
    • Introduction
    • CLI Commands
  • Tips & Tricks
    • Performance
  • JS Integration
    • Supporting both Vitrin and Legacy themes
    • Responses & Errors
    • Cart
    • Products
    • Categories
    • Store
    • Account
    • Blogs
    • Options
    • Events
  • Features
    • SDK Popups – Integration Guidelines
    • Custom Styles Guide
    • Gift Card as a Popup
    • Addresses as a Popup
    • Login as a Popup
    • Checkout as a Popup
    • Apple Pay Quick Checkout
    • Region & Language Popup
    • Dynamic Bundle Products
    • Progressive Discounts
    • Customer Wallet & Cashback
    • Add Preorder Support to Your Theme
  • Mobile Apps
    • Scripts
  • API's
    • Authentication
      • Logout
      • Login Status
      • SMS Login
      • Verify SMS Login
      • WhatsApp Login
      • Verify WhatsApp Login
      • Email Login
      • Verify Email Login
      • Register
      • Register Guest
    • Products
      • List Products
      • Search Products
      • Calculate Product Options Price
      • Notify Product Stock Availability
      • Fetch Bundle Offers
      • Fetch Bundle Offers for a Product
      • List My Product Reviews
      • List Product Reviews
      • Create Product Review
      • Update Product Review
      • Delete Product Review
      • List Product Questions
      • Create Product Question
      • Get Product by Slug
      • Get Selection Groups
    • Categories
      • List Categories
    • Checkout
      • Get Cart
      • Remove Cart
      • Duplicate Cart
      • Add Cart Item
      • Empty Cart
      • Update Cart Item
      • Remove Cart Item
      • Upload Cart Input Field
      • Add Gift Card
      • Remove Gift Card
      • Apply Coupon
      • Remove Coupon From Cart
      • Check Coupon Validity
      • Apply Loyalty Points
      • Remove Loyalty Points
      • Preview Rewarded Points
      • List Redemption Methods for Cart
      • Customer’s Loyalty Wallet
      • Customer’s Current Points Balance
    • Account
      • Get Profile
      • Delete Account
      • Update Customer Profile
      • Get Addresses
      • Create an Address
      • Get an Address by ID
      • Update an Existing Address
      • Delete Address
      • Get Orders
      • Get Shareable Wishlist Link
      • Get Wishlist
      • Add Products to Wishlist
      • Remove Product from Wishlist
      • Get Address Form Schema
      • Check Product Purchase Status
    • Storefront
      • Store Scripts
      • Pages
      • Blogs
    • Countries
      • Get Countries
      • Get Cities By Country
  1. Building with Vitrin

Vitrin's Jinja Extensions

Our theme templating is based on Jinja with a small set of platform tags, filters, and macros layered on top to make theme development fast, safe, and consistent.

Overview#

Base layout: all templates must extend layout.jinja (provided by the system).
Defaults: any missing template/section falls back to Zid’s default theme.
Settings: never hardcode styles or copy; read from settings (JSON Schema).
Components: use platform macros (primitive UI) instead of custom markup.
Versioning: features are versioned; no breaking changes within a major version.
Errors: server errors are handled by the SDK, not by themes.

Tags#

Quick helpers available in templates.
TagPurpose StatusType
url_forBuild a canonical URL for a routeMacro
asset_urlResolve a theme asset CDN URLfilter
image_urlResolve and resize images CDN URLMacro

using url_for#

Build URLs without hardcoding paths; instead using an operation name. this respects locale and routing rules.

existing Operation names#

the required path variables can be found with the endpints documentation
ConstantValue
CHANGE_LOCALEchange_locale
LIST_PRODUCTSlist_products
PRODUCT_REVIEWSproduct_reviews
ADD_PRODUCT_REVIEWadd_product_review
PRODUCT_QUESTIONSproduct_questions
ADD_QUESTIONadd_question
PRODUCT_DETAILSproduct_details
LIST_CATEGORIESlist_categories
CATEGORY_DETAILScategory_details
PROFILEprofile
UPDATE_PROFILE_PAGEupdate_profile_page
ORDERSorders
ADDRESSESaddresses
WISHLISTwishlist
LOYALTY_PROGRAMloyalty_program
ADD_ADDRESSadd_address
EDIT_ADDRESSedit_address
UPDATE_EMAIL_PAGEupdate_email_page
REGISTER_PAGEregister_page
LOGIN_PAGElogin_page
VERIFICATION_PAGEverification_page
CART_PAGEcart_page
SINGLE_PAGE_CHECKOUTsingle_page_checkout
CHOOSE_SHIPPINGchoose_shipping
CHOOSE_PAYMENTchoose_payment
ORDER_INVOICEorder_invoice
ORDER_COMPLETEDorder_completed
TRANSACTION_SLIP_UPLOADtransaction_slip_upload
HOMEhome
PAGESpages
BLOGSblogs
FAQSfaqs
SHIPPING_PAYMENTshipping_payment
LANDING_PAGElanding_page
AFFILIATE_REPORTSaffiliate_reports
SITEMAP_XMLsitemap_xml
PRODUCTS_FEEDproducts_feed
PRODUCTS_REVIEWS_FEEDproducts_reviews_feed
Params

asset_url#

Return a versioned CDN URL for an asset.
Returns: string (URL)
Modified at 2026-02-17 07:02:10
Previous
Jinja Basics
Next
Introduction
Built with