--- { "name": "<%= config[:name] %>", "class": "my-css-classname", "icon": "<%= config[:icon] || 'image_text' %>", <% if config[:global] -%>"keep_icon": true,<% end %> "settings": [ { "label": "My awesome title", "id": "title", "type": "text" } ], "blocks": [ { "name": "List item", "type": "list_item", "settings": [ { "label": "Item title", "id": "title", "type": "text" } ] } ]<% if config[:global] -%>, "default": { "settings": { "title": "Hello world" }, "blocks": [ { "type": "list_item", "settings": { "title": "Item #1" } }, { "type": "list_item", "settings": { "title": "Item #2" } }, { "type": "list_item", "settings": { "title": "Item #3" } } ] }<% else -%>, "presets": [ { "name": "<%= config[:name] %>", "category": "Category 1", "settings": { "title": "Hello world" }, "blocks": [ { "type": "list_item", "settings": { "title": "Item #1" } }, { "type": "list_item", "settings": { "title": "Item #2" } }, { "type": "list_item", "settings": { "title": "Item #3" } } ] } ]<% end %> } --- {% comment %} Above is the JSON definition of your section filled with random settings and blocks. The setting's type can be one of the following values : checkbox, image_picker, index, radio, rich_text, select, text, url. Modify it to match your needs. <% if config[:global] -%> To use your global section, just add the following code in your layout template: {% global_section <%= config[:type] %> %} <% else -%> To use your section, 2 possibilites: 1. within a dropzone Make sure that your layouts includes the following liquid tag: {% sections_dropzone %} If you want to test this section in your Wagon site, add the following lines in the YAML section of any page including the {% sections_dropzone %} (or inheriting from a layout including it): sections_dropzone_content: > [ { "type": "<%= config[:type] %>", "settings": { "title": "My awesome section", }, "blocks": [ { "type": "list_item", "settings": { "title": "Item #1" } }, { "type": "list_item", "settings": { "title": "Item #2" } }, { "type": "list_item", "settings": { "title": "Item #3" } } ] } ] 2. as stand-alone section {% section <%= config[:type] %> %} If you want to test this section in your Wagon site, add the following lines in the YAML section of the page including the statement above or complete it. sections_content: > { "<%= config[:type] %>": { "settings": { "title": "My awesome <%= config[:type].humanize %> section" }, "blocks": [ { "type": "list_item", "settings": { "title": "Item #1" } }, { "type": "list_item", "settings": { "title": "Item #2" } }, { "type": "list_item", "settings": { "title": "Item #3" } } ] } } <% end -%> {% endcomment %}