Согласно учебному пособию по Shopify https://help.shopify.com/themes/development/theme-editor/settings-schema
файлов, мы можем определить настройку темы через set {% schema%}, как в следующем примере:
{% schema %}
{
"name": "Line",
"class": "index-section",
"settings": [
{
"type": "radio",
"id": "small_line",
"label": "Correct Gap",
"options": [
{
"value": "none",
"label": "None"
},
{
"value": "gap1",
"label": "Different Gap"
}
],
"default": "none"
}
],
"presets": [
{
"name": "Line",
"category": "Design",
"settings": {
}
}
]
}
{% endschema %}
Мой вопрос, если есть способ, которым мы можем установить эти параметры, чтобы они были динамическими в части схемы, такие как определение параметров small_line в качестве переменной в приведенном выше примере, что-то похожее на следующее
{% schema %}
{
"name": "Line",
"class": "index-section",
"settings": [
{
"type": "radio",
"id": "small_line",
"label": "Correct Gap",
"options": MY_OPTIONS_VAR,
"default": "none"
}
],
"presets": [
{
"name": "Line",
"category": "Design",
"settings": {
}
}
]
}
{% endschema %}