My Blocks isn't showing the default presets

So i was learning blocks and then i made a block which should had contained 2 buttons by default. That buttons should have a text in them and a link in them. Here is my code of my Testing Section

<div id="section-cta">
  <div class="section-header text-center">
    <h3>{{section.settings.text-box}}</h3>
  </div>

  {% for block in section.blocks %}
  <div class="btn btn-primary">
    <a href="{{block.settings.link}}" class="btn btn-primary">{{block.settings.linktext}}</a>

  </div>
  {% endfor %}
</div>

{% schema %}
  {
    "name": "CTA Blocks",
    "max_blocks" : 3,
    "settings": [
    {
      "id" : "text-box",
      "type" : "text",
      "label" : "Heading",
      "default" : "Title"
    }
],
"blocks":[
{
  "type" : "select",
  "name" : "select",
  "settings" : [
  {
    "id" : "link",
    "type" : "url",
    "label" : "Button Link"
  },
  {
    "id" : "linktext",
    "type" : "text",
    "label" : "Button Here",
    "default" : "Click Here"
  }
]
}

],
"presets" : [
{
  "name": "Call to Action Blocks",
  "category": "Call to Action",
  "blocks": [
  {
    "type" : "select"
  },
  {
    "type" : "select"
  }
]
  }
]
}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}

As per this code there should be 2 buttons by default right?

But there are no buttons i have to do it manually. I have to click Add Select and then only the buttons appear. Anything i am doing wrong here?

2 Likes

Im looking for an answer to this too. I tried using defaults and that wasn’t working either. If i add an image with text for example it has default content. I just want that for my own sections but cant see what i’m doing differently.