Skip to main content
Wrappers and functions in Quickbutik’s Mustache implementation provide essential tools for transforming and manipulating data. These helper functions extend Mustache’s capabilities for specific use cases like image optimization, translations, and asset linking.
Prerequisites: This guide covers the available wrapper functions. Make sure you understand basic Mustache syntax and object access patterns first.
Key Concept: Wrappers use the {{#function}}content{{/function}} syntax to process and transform data

Available Wrappers

According to the Quickbutik platform, only the following wrappers are supported:

Image Wrapper ({{#img}})

The image wrapper is essential for handling product images and media optimization:

Image Size Options

Settings Home Elements Images

Language Wrapper ({{#lang}})

Handle multi-language content and translations via the Control Panel:

Assets Wrapper ({{#assets}})

Link to correct paths for theme files like CSS, JavaScript, and other assets:
Output breadcrumbs/category structure regardless of the current page:
Within the {{#breadcrumbs}} loop:

Asset Flags Wrapper ({{#asset_flags}})

Return flag icons for languages (used within the languages loop):

Combining Wrappers

Complete Examples with Multiple Wrappers

Best Practices

Image Optimization

Always use the {{#img}} wrapper with appropriate dimensions for optimal performance

Translation Consistency

Wrap all user-facing text with {{#lang}} for proper multi-language support

Asset Management

Use {{#assets}} for all theme files to ensure correct paths across environments

Breadcrumb Navigation

Implement breadcrumbs for better user navigation and SEO benefits

Common Patterns

Error Handling and Fallbacks

Next Steps

Global Objects

Learn how to use wrappers with global object data

Product Pages

Apply wrappers in product page templates

Template Structure

Understand how wrappers fit into overall theme architecture

Best Practices

Follow coding standards and optimization guidelines