Themes built on the Twig templating engine are now deprecated and require migration to Vitrin to ensure continued support and compatibility with Zid.
The theme editor reads a JSON schema that defines display settings for merchants in the theme editor.
section.jinja is required to have a corresponding section.schema.json file in the same directory.| Field | Type | Description | Required |
|---|---|---|---|
| name | object {ar,en} | Section title shown to the merchant (Arabic/English). | |
| template | string | Path to the section’s Jinja template (e.g., "sections/image_slider.jinja"). | |
| settings | array | List of inputs the merchant can change (see Input Settings). | |
| icon | text | Optional reference to an icon (e.g. fal fa-box). |
/sections/image_slider.schema.json file would look like:{
"name": {
"ar": "شرائح الصور",
"en": "Image Slider"
},
"template": "sections/image_slider.jinja",
"settings": [
{
"type": "checkbox",
"id": "hide_dots",
"label": {
"ar": "إخفاء النقاط",
"en": "Hide dots"
},
"default": true
}
]
}layout.schema.jsonheader.schema.jsonfooter.schema.json| Field | Type | Description | Required |
|---|---|---|---|
| name | object {ar,en} | Section title shown to the merchant (Arabic/English). | |
| groups | array | List of objects that represent each group of settings. The structure of a group is almost identical to the schema of an individual section | |
| icon | text | Optional reference to an icon (e.g. fal fa-box). |
{
"icon": "fa fa-square",
"name": {
"ar": "اعلى الصفحة",
"en": "Header"
},
"groups": [
{
"id": "header",
"icon": "font_awesome",
"name": {
"ar": "رأس الصفحة",
"en": "Header"
},
"settings": [
{
"id": "logo",
"type": "image",
"label": {
"ar": "الشعار",
"en": "Logo"
},
"info": {
"ar": "ارفع صورة بحجم 750 * 750 ",
"en": "This is an info text sample here"
}
}
]
}
]
}{
"icon": "fa fa-square",
"name": {
"ar": "اعلى الصفحة",
"en": "Header"
},
"groups": [
{
"id": "header",
...
"settings": [
{
"id": "logo",
...
}
}
]
}
]
}settings.header_logo in your jinja file templates.