Zid Themes Docs
  • Getting started
  • Twig reference
  • Theme file structure
  • zid-theme package
  • Theme Templates and Data
    • layout.twig
  • Store language and currency
  • Home template modules
  • Product template
  • Cart template
  • Settings Schema
    • text
    • number
    • textarea
    • select
    • radios
    • checkbox
    • checkboxes
    • range
    • color
    • image
    • product
    • category
    • category products
    • list
    • fieldset
  • Data reference
    • locals
    • store
    • cart
    • product
    • products list
    • category
    • categories list
    • session
    • customer
    • faqs
    • blogs
    • blog
    • page
    • main menu
    • request
    • orders
    • addresses
    • store payment methods
    • store shipping methods
    • store banks
    • asset_url
    • header_meta_tags
  • Zid-api Library
    • Product
    • Category
    • Cart
    • Blog
    • Customer
    • Settings
  • Upload themes and more
Powered by GitBook
On this page
  • Theme layout
  • Theme data
  • Available data across all theme template
  • Templates

Was this helpful?

Theme Templates and Data

Previouszid-theme packageNextlayout.twig

Last updated 3 years ago

Was this helpful?

Theme layout

All theme template files must extend layout.twig file, which include: header ,footer and main_content blocks.

{% extends "layout.twig" %}

As an example:

Theme data

In each page, there are specified data available for developers to consume, which will give the developer a large space to show and use their skills in building a theme.

Available data across all theme template

  • template (string with template name ex: home, products ..etc )

Templates

Home

url: /

{% block main_content %}

    <div class="home">
        {{ home_template_modules }}
    </div>

{% endblock %}

Products

url: /products

file: products.twig

Product

url: /products/{slug}

file: product.twig

Categories

url: /categories

file: categories.twig

Category

url: /category/{id}/{slug}

file: category.twig

Cart

url: /cart/view

file: cart.twig

Shipping and payment

url: /shipping-and-payment

file: shipping-and-payments.twig

Faqs

url: /faqs

file: faqs.twig

Blogs

url: /blogs

file: blog.twig

Blog

url: /blogs/{slug}

file: blog.twig

Page

url: /pages/{slug}

slug: must be one of:

  • terms-and-conditions

  • privacy-policy

  • refund-exchange-policy

  • license

  • complaints-and-suggestions

file: page.twig

Account profile

url: /account-profile

file: account-profile.twig

template : account_profile_template_content

Account addresses

url: /account-addresses

file: account-addresses.twig

Account orders

url: /account-orders

file: account-orders.twig

Account address

(system template)

url: /account-addresses/{id}/edit

navigate customer to the url and system will display address content

use url: /account-addresses/add

to navigate customer to add new address

Account order

(system template)

url: /orders/{orderCode}/invoice

navigate customer to the url and system will display order content

In home.twig display modules added by user by home_template_modules check

data:

data:

templates: , ,

data:

data: and

data:

data: , and

data:

data:

data:

data:

data:

data:

layout.twig
session
store
customer
asset_url
main menu
request
header_meta_tags
locals
Zid API
home template modules
products list
product
template_for_product_variants_dropdown
template_for_product_input_fields
template_for_product_option_fields
categories list
category
products list
cart
store payment methods
store shipping methods
store banks
faqs
blogs
blog
page
addresses
orders