Templates
All theme template files must extend layout.twig file, which include: header ,footer and main_content blocks.
{% extends "layout.twig" %}
Theme data
In each file, 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.
Info
There are some data availabe for specific template file, check theme files
Available data across all theme template
- session
- store
- customer
- asset_url
- [main menu] deprecated
- main navigation menu
- request
- header_meta_tags
- locals
- [template (string with template name ex: home, products ..etc )]
- Zid API
Templates
Home
url: /
file: home.twig
data: home_template_modules
Products
url: /products
file: products.twig
data: products
templates: template_for_products_attributes
Product
url: /product/{slug}
file: product.twig
data: product
templates: template_for_product_variants_dropdown
, template_for_product_input_fields
, template_for_product_option_fields
Categories
url: /categories
file: categories.twig
data: categories
Category
url: /category/{id}/{slug}
file: category.twig
templates: template_for_products_attributes
Cart
url: /cart/view
file: cart.twig
data: cart
Shipping and payment
url: /shipping-and-payment
file: shipping-and-payments.twig
data: store payment methods
,store shipping methods
,store banks
Faqs
url: /faqs
file: faqs.twig
data: faqs
Blogs
url: /blogs
file: blog.twig
data: blogs
Blog
url: /blogs/{slug}
file: blog.twig
data: blog
Page
url: /pages/{slug}
slug: must be one of:
terms-and-conditions
privacy-policy
refund-exchange-policy
license
complaints-and-suggestions
file: page.twig
data: page
Account profile
url: /account-profile
file: account-profile.twig
template : account_profile_template_content
Account addresses
url: /account-addresses
file: account-addresses.twig
data: addresses
Account orders
url: /account-orders
file: account-orders.twig
data: orders