liquid
liquid copied to clipboard
feature request: schema variable support
as I'm creating Shopify blocks and there is a limit on the app block size, list settings become very cumbersome due to their size:
{
"type": "select",
"id": "one",
"label": "One",
"options": [
{ "value": "a", "label": "A" },
{ "value": "b", "label": "B" },
if I would create 10 drop downs with A-Z selectors, they would almost hit the limit. It would be nice to create something like:
{% schema %}
{%- assign options = [...-%}
...
{
"type": "select",
"id": "one",
"label": "One",
"options": options
a scoped variable to the schema or just somehow create:
{% schema %}
{
"variables": { "options": [] }
and reference from inside the schema (probably easier if schema is a json, just search for that value inside the schema under "variables"