I created a custom section called “Video with Text” following by following this thread: https://community.shopify.com/post/1499504
Everything works well. However, I am unable to edit the main header with bold and the sizes options don’t work.
There seems to be a missing line in my video-with-text.liquid code, but I can’t seem to find it what’s wrong. I just tried matching the code with the image-with-text.liquid and still can’t figure it out. Please help!
{{ 'component-video-with-text.css' | asset_url | stylesheet_tag }}
{%- for block in section.blocks -%}
{% case block.type %}
{%- when 'heading' -%}
##
{{ block.settings.heading | escape }}
{%- when 'text' -%}
{{ block.settings.text }}
{%- when 'button' -%}
{%- if block.settings.button_label != blank -%}
{% schema %}
{
"name": "Video with text",
"class": "spaced-section spaced-section--full-width",
"settings": [
{
"type": "select",
"id": "color_scheme",
"options": [
{
"value": "background-1",
"label": "Background 1"
},
{
"value": "background-2",
"label": "Background 2"
},
{
"value": "inverse",
"label": "Inverse"
},
{
"value": "accent-1",
"label": "Accent 1"
},
{
"value": "accent-2",
"label": "Accent 2"
}
],
"default": "background-1",
"label": "Color scheme"
},
{
"type": "text",
"id": "video_url",
"default": "https://cdn.shopify.com/s/files/1/0050/2779/0919/files/1_1_Cutting_fruit_H.mp4?v=1603372350",
"label": "Video url",
"info": "Upload your video to Shopify then paste the url here"
},
{
"type": "select",
"id": "height",
"options": [
{
"value": "adapt",
"label": "Adapt"
},
{
"value": "small",
"label": "Small"
},
{
"value": "large",
"label": "Large"
}
],
"default": "adapt",
"label": "Video ratio"
},
{
"type": "select",
"id": "layout",
"options": [
{
"value": "image_first",
"label": "Video first"
},
{
"value": "text_first",
"label": "Text first"
}
],
"default": "image_first",
"label": "Desktop layout",
"info": "Video first is the default mobile layout."
}
],
"blocks": [
{
"type": "heading",
"name": "t:sections.video-with-text.blocks.heading.name",
"limit": 1,
"settings": [
{
"type": "inline_richtext",
"id": "heading",
"default": "Video with text",
"label": "t:sections.video-with-text.blocks.heading.settings.heading.label"
},
{
"type": "select",
"id": "heading_size",
"options": [
{
"value": "h2",
"label": "t:sections.all.heading_size.options__1.label"
},
{
"value": "h1",
"label": "t:sections.all.heading_size.options__2.label"
},
{
"value": "h0",
"label": "t:sections.all.heading_size.options__3.label"
}
],
"default": "h1",
"label": "t:sections.all.heading_size.label"
}
]
},
{
"type": "caption",
"name": "t:sections.video-with-text.blocks.caption.name",
"limit": 1,
"settings": [
{
"type": "text",
"id": "caption",
"default": "Add a tagline",
"label": "t:sections.video-with-text.blocks.caption.settings.text.label"
},
{
"type": "select",
"id": "text_style",
"options": [
{
"value": "subtitle",
"label": "t:sections.video-with-text.blocks.caption.settings.text_style.options__1.label"
},
{
"value": "caption-with-letter-spacing",
"label": "t:sections.video-with-text.blocks.caption.settings.text_style.options__2.label"
}
],
"default": "caption-with-letter-spacing",
"label": "t:sections.video-with-text.blocks.caption.settings.text_style.label"
},
{
"type": "select",
"id": "text_size",
"options": [
{
"value": "small",
"label": "t:sections.video-with-text.blocks.caption.settings.caption_size.options__1.label"
},
{
"value": "medium",
"label": "t:sections.video-with-text.blocks.caption.settings.caption_size.options__2.label"
},
{
"value": "large",
"label": "t:sections.video-with-text.blocks.caption.settings.caption_size.options__3.label"
}
],
"default": "medium",
"label": "t:sections.video-with-text.blocks.caption.settings.caption_size.label"
}
]
},
{
"type": "text",
"name": "Text name",
"limit": 1,
"settings": [
{
"type": "richtext",
"id": "text",
"default": "
Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.
",
"label": "Description"
}
]
},
{
"type": "button",
"name": "Button name",
"limit": 1,
"settings": [
{
"type": "text",
"id": "button_label",
"default": "Button label",
"label": "Button label",
"info": "Leave the label blank to hide the button."
},
{
"type": "url",
"id": "button_link",
"label": "Button link"
}
]
}
],
"presets": [
{
"name": "t:sections.video-with-text.presets.name",
"blocks": [
{
"type": "heading"
},
{
"type": "text"
},
{
"type": "button"
}
]
}
]
}
{% endschema %}
This is the code in my video-with-text.liquid
