本文档由 Apifox 自动生成,推荐使用 Apifox - API 文档、API 调试、API Mock、API 自动化测试!
twilight.json
file is included within the Twilight theme, and it is placed in the root directory. This setup file contains the main theme's information, features and components for the rendering purpose that occurs on the Theme. Use Salla Partners Portal to conduct visual modifications that includes Theme settings, Theme features, and Theme components.twilight.json
file.version
, theme_name
, repo_url
, and theme support_url
, which is also included in the settings:{
"version": "1.0.0",
"theme_name": "Theme One",
"repo_url": "https://github.com/SallaApp/theme-raed",
"support_url": "https://salla.dev"
...
}
type
, label
, id
, and format
.switch
format, which by default is not selected.{
...
"settings": [
{
"type": "boolean",
"label": "شريط علوي داكن",
"id": "topnav_is_dark",
"format": "switch",
"selected": false
},
{
"type": "string",
"id": "placeholder",
"format": "hidden",
"value": "images/img_placeholder.png"
}
],
...
}
topnav_is_dark
. This setting can be accessed by using any of the following methods:
component-
inside twilight.json, and include only the components that are supported in your theme.{
...
"features": [
...
"component-featured-products",
"component-fixed-banner",
"component-fixed-products",
"component-photos-slider",
"component-products-slider",
"component-parallax-background",
"component-random-testimonials",
"component-testimonials",
"component-square-photos",
"component-store-features",
"component-youtube",
"filters"
]
...
}
custom-slider
.path
of this new component is mentioned in "path": "home.custom-slider"
.views\components\home\custom-slider.twig
.views\components\folder
.{
...
"components": [
{
"name": "custom-slider",
"title": "صور متحركة (مخصص)",
"icon": "sicon-image-carousel",
"path": "home.custom-slider",
"fields": [
{
"id": "images",
"type": "collection",
"format": "collection",
"required": true,
"minLength": 1,
"maxLength": 10,
"fields": [
{
"id": "image",
"type": "string",
"format": "image"
},
{
"id": "title",
"type": "string",
"label": "عنوان رئيسي (إختياري)"
},
{
"id": "sub_title",
"type": "string",
"format": "textarea",
"label": "نص توضيحي (إختياري)"
}
]
}
]
},
...
}