Skip to main content

Template Structure

Quickbutik themes are built using the Mustache templating language. This guide covers the theme architecture and file organization you need to understand before building your first theme.

Theme Architecture

Template Files

Quickbutik themes consist of several template files, each serving a specific purpose:

Accessing Template Files

You can access and edit your theme’s source code through your Quickbutik control panel: Utseende > Tema > Kod under huven
Always make a backup of your theme before making changes, and test thoroughly in a theme under construction before publishing to your live version!

Data Availability

Understanding which data is available on which templates is crucial for effective theme development:

Global Objects

Available on all pages:
  • shop - Store settings and configuration
  • user - Customer login/account information
  • basket - Shopping cart data
  • seo - Search engine optimization data
  • linklist - Navigation menus
  • paylink - Checkout URL

Page-Specific Objects

Available only on specific templates:

File Organization Best Practices

CSS and Assets

Template Structure Example

Template Inheritance Patterns

Common Header/Footer

Most themes follow this pattern:
  1. Header section - Logo, navigation, search (same across all pages)
  2. Main content - Varies by template type
  3. Footer section - Links, contact info (same across all pages)

Responsive Considerations

Structure your templates with mobile-first approach:
  • Use flexible grid systems
  • Optimize images with {{#img}} wrapper
  • Test on multiple screen sizes

Next Steps

Now that you understand the theme structure, learn the templating language:

Mustache Basics

Learn the fundamentals of Mustache templating

Objects and Attributes

How to access and display data in your themes

Global Objects

Explore shop, user, and navigation data

Development Setup

Set up your development environment