Liquid Theme System
Liquid Theme System
Cartly supports a Liquid-based theme engine that gives developers full control over storefront HTML rendering. Unlike the Visual Editor ā which uses a drag-and-drop interface and React components ā Liquid themes are code-first: you write template files using the Liquid templating language, and Cartly renders them on the server before sending HTML to the browser.
Liquid Themes vs. Visual Editor
- Visual Editor ā No-code, drag-and-drop blocks, ideal for merchants who want quick customization without touching code.
- Liquid Themes ā Full control over markup and logic, ideal for developers and agencies who need pixel-perfect designs or advanced dynamic content.
Both approaches can coexist. If a Liquid template file exists for a given page, Cartly renders it through the Liquid engine. If no Liquid file is found, the platform falls back to the React component rendered by the Visual Editor.
Installing a Theme from the Marketplace
- Navigate to Admin ā Online Store ā Themes.
- Click Explore Themes to open the theme marketplace.
- Browse or search for a theme, then click Install.
- The theme appears in your theme library, ready to preview or publish.
Publishing a Theme
In the theme library, find the theme you want to make live and click the Publish button. The published theme is immediately applied to your storefront. You can only have one published theme at a time; the previously published theme is moved back to draft status.
Theme File Structure
Every Liquid theme follows a standard directory layout:
my-theme/
āāā layouts/
ā āāā theme.liquid # Main layout wrapper (header, footer, {content_for_layout})
āāā templates/
ā āāā index.liquid # Homepage
ā āāā product.liquid # Product detail page
ā āāā collection.liquid # Collection page
ā āāā cart.liquid # Cart page
ā āāā page.liquid # CMS pages
ā āāā blog.liquid # Blog listing
ā āāā article.liquid # Single blog post
āāā sections/
ā āāā header.liquid # Header section
ā āāā footer.liquid # Footer section
ā āāā hero.liquid # Hero banner section
ā āāā featured-products.liquid
āāā snippets/
ā āāā price.liquid # Reusable price formatting
ā āāā product-card.liquid # Product card partial
ā āāā image.liquid # Responsive image helper
āāā assets/
ā āāā theme.css # Stylesheets
ā āāā theme.js # Client-side JavaScript
āāā config/
āāā settings_schema.json # Theme-level settings definition
āāā settings_data.json # Current settings values
How Rendering Works
When a storefront page is requested, Cartly follows this process:
- Determine the page type (product, collection, index, etc.).
- Check if the published theme contains a matching Liquid template in
templates/. - If a Liquid file exists, render it through the Liquid engine with the relevant data context (product, collection, cart, etc.).
- Wrap the output in the
layouts/theme.liquidlayout. - If no Liquid file is found for the requested page, fall back to the default React component rendering pipeline.
This hybrid approach means you can incrementally adopt Liquid ā override only the pages you need, and let the platform handle the rest.