adding dynamic sections to pages

offthemats
New Member
2 0 0

Hey there, I want to add dynamic sections to my collection- , and product pages. 

For this Ive created a test-page using a new template. the next step would be to add a new section with the following code:

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

 

But it will always show me the following error: Error: Invalid JSON in tag 'schema'. Ive already tried linking but can't seem to find where its going wrong. 

Your help is greatly appreciated, thanks so much!!

0 Likes