repeated JSON error when trying to add dynamic sections to page

offthemats
New Member
2 0 0

Hey there, 
I want to add dynamic sections to some of my collection and product pages, the theme Im using is Boundless. Ive come as far as adding a new page template with the following code {% section ‘test-page’ %} (it already showed me an error there and someone from Shopify support was so kind to fix and add it for me) and applying that template to a page via the admin section.
The next step would be to add a new section containing the following

{% for block in section.blocks %}
    {% case block.type %}
        {% when 'rich-text' %}
        {% include 'rich-text-on-page' %}
        {% when 'video' %}
        {% include 'video-on-page' %}
    {% endcase %}
{% endfor %}
{% schema %}
{
"blocks": [
{
  "type": "rich-text",
  "name": "Rich text",
  "settings": [ *SETTINGS FOR RICH TEXT SECTION* ]
},
{
  "type": "video",
  "name": "Full Width YouTube Video",
  "settings": [
    {
      "type": "text",
      "id": "videoID",
      "label": "Video ID",
      "default": "Enter Video ID Here"
    }
  ]
}
]
}
{% endschema %}

When trying to save the asset, it shows me this error (Error: Invalid JSON in tag 'schema') though, so I can't proceed. Ive tried linting etc. but none of it works. Any help is appreciated, thank you so much in advance!!

0 Likes