I want to add a subtitle option, but also to make it customizable via the drawer in the customize.
how can I do that?
thanks!
A user wants to add a customizable subtitle field to a featured collection section that appears in the theme customizer’s drawer interface.
Solution Provided:
Extend the theme editor using Shopify’s {% schema %} tags by:
Alternative Approach:
For those comfortable with coding, the subtitle can be hardcoded directly into the section file, bypassing the customizer interface.
An example schema structure for a slideshow section was shared to illustrate the syntax and format needed for adding customizable fields to the theme editor.
I want to add a subtitle option, but also to make it customizable via the drawer in the customize.
how can I do that?
thanks!
If you want to extend the theme editor this is done through shopify’s {% schema %} tags. This is a matter of going into the respective section and adding what you want between a set of schema tags. This is an example how a slideshow looks, and this would allow a merchant to add a slideshow through the theme editor. If you are comfortable with code though you can bypass this and add text directly in your code.
{% schema %}
{
"name": "Slideshow",
"tag": "section",
"class": "slideshow",
"settings": [
{
"type": "text",
"id": "title",
"label": "Slideshow"
}
],
"blocks": [
{
"name": "Slide",
"type": "slide",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Image"
}
]
}
]
}
{% endschema %}