1. Template Library
  • Getting Started
    • Introduction
    • Theme Development
    • Publishing Your Theme
    • Legacy Theme Migration
      • Store Settings Mapping
      • Moving to Vitrin Using LLMs
      • Twig to Jinja
      • Breaking Changes
  • Key Concepts
    • Architecture
    • Templates
      • Overview
      • Template Library
        • home.jinja
        • 404_not_found.jinja
        • account_wishlist.jinja
        • categories.jinja
        • page.jinja
        • reviews.jinja
        • account_addresses.jinja
        • blog.jinja
        • category.jinja
        • product.jinja
        • search.jinja
        • account_orders.jinja
        • blogs.jinja
        • faqs.jinja
        • products.jinja
        • shipping_payment.jinja
        • account_profile.jinja
        • cart.jinja
        • questions.jinja
        • wishlist.jinja
    • Settings
      • Sections
      • Input Settings
      • Media Settings
      • Form Controls Settings
      • Products Settings
      • Additional Settings
      • Conditional Visibility
      • Migrating twig settings schema
    • Localization
      • localization (jinja v. twig)
  • Building with Vitrin
    • Jinja Basics
    • Vitrin's Jinja Extensions
    • Objects Reference
  • Vitrin CLI
    • Introduction
    • CLI Commands
  • Tips & Tricks
    • Performance
  • Features
    • Loyalty
    • Bundle Products
  1. Template Library

home.jinja

Path: templates/home.jinja
Purpose: Renders the store’s homepage with hero banners, featured products, and promotional sections.
Fallback: If missing, Zid’s default homepage is used.

Usage#

Always extend the base layout:
Use platform macros for UI consistency:

Context Variables#

store — store details (branding, name, domain)
settings — theme + store settings (colors, toggles)
featured_products — array of product objects
hero_banner — hero image, title, link

Example#


Key Notes#

Pull colors, fonts, and text from settings — never hardcode.
Handle empty arrays gracefully (skip or show “No products yet”).
Preload hero image for better Largest Contentful Paint (LCP).
Modified at 2025-08-17 10:47:33
Previous
Overview
Next
404_not_found.jinja
Built with