Nested arrays in sections

Highlighted
New Member
23 0 0

I'm creating a lookbook page, where there will be multiple sliders, and multiple images uploaded into each slider. And I want to make it all editable via the theme editor. Essentially this is a nested section, although I'm having trouble figuring out if this is actually supported.

Ideally, it'd look like this:

Lookbook 1

Lookbook 2

[add lookbook]

and inside each Lookbook:

     Image 1

     Image 2

     [add image]

I'm not seeing a way to create a a block that can then have multiple items inside of it automatically. The closest I've come is setting individually IDs for each image "slot" each slider would have, but the problem is that each slider will have a varying number of images and it'd be far more elegant to simply have an "Add Image" button instead of a fixed number.

Current code below:

  {% schema %}
    {
      "name": "Lookbooks",
      "blocks": [
        {
          "type": "button",
          "name": "Lookbook",
          "settings": [
            {
              "id": "name",
              "type": "text",
              "label": "Lookbook Name"
            },
            {
              "id": "image",
              "type": "image_picker",
              "label": "Image 1"
            },
            {
              "id": "image2",
              "type": "image_picker",
              "label": "Image 2"
            },
            {
              "id": "image3",
              "type": "image_picker",
              "label": "Image 3"
            }
          ]
        }
      ]
    }
  {% endschema %}

And screenshots of how it's appearing in the theme editor:

http://cory.la/1briGV

http://cory.la/jvIjZl

0 Likes
Excursionist
129 0 8

Hi,

I'm afraid this is impossible, the Shopify section supports one level only.

Developer from SellerSmith team
0 Likes