First, thank you for your response.
For us, it is necessary to use liquid because we want that our Newsletter pop-up to be fully customizable from the Admin Online Store. Shopify provide lot of functionnalities to easly create website customizable elements and it would be a shame to not use it.
As you can see the following schema there is lot of usefull settings to customize the pop-up and we can can not provide only one code for all of our customers :
{% schema %}
{
"name": "Probance POP-UP",
"settings": [
{
"type": "header",
"content": "Display rules"
},
{
"type": "select",
"id": "displaying_mode",
"label": "Display mode",
"options": [
{
"value": "after-scroll",
"label": "After scroll"
},
{
"value": "after-delay",
"label": "After delay"
},
{
"value": "disabled",
"label": "Disabled"
},
{
"value": "test",
"label": "Test mode"
}],
"default": "disabled",
"info": "Select 'Test mode' to customize your pop-up."
},
{
"type": "number",
"id": "days_after_first_display",
"label": "Days between two displays",
"default" : 0,
"info": "Choose '0' to display the pop-up everytime."
},
{
"type": "range",
"id": "displaying_delay",
"min": 0,
"max": 30,
"step": 1,
"unit": "s",
"label": "Displaying delay",
"default": 4
},
{
"type": "range",
"id": "scroll_offset",
"min": 0,
"max": 100,
"step": 5,
"unit": "%",
"label": "Scroll offset",
"default": 30
},
{
"type": "header",
"content": "General"
},
{
"type": "color",
"id": "popup_bg_color",
"label": "Backgound color",
"default": "#FFFFFF"
},
{
"type": "range",
"id": "overlay_opacity",
"min": 0,
"max": 100,
"step": 1,
"unit": "%",
"label": "Overlay opacity",
"default": 25
},
{
"type": "select",
"id": "popup_position",
"label": "Position",
"options": [
{
"value": "center",
"label":"Center"
},
{
"value": "right-top",
"label":"Right/Top"
},
{
"value": "right-bottom",
"label":"Right/Bottom"
},
{
"value": "left-top",
"label":"Left/Top"
},
{
"value": "left-bottom",
"label":"Left/Bottom"
}
],
"default": "center"
},
{
"type": "checkbox",
"id": "popup_rounded",
"label": "Rounded",
"default": true
},
{
"type": "select",
"id": "form_txt_position",
"label": "Text position",
"options": [
{
"value": "left",
"label": "Left"
},
{
"value": "right",
"label": "Right"
},
{
"value": "center",
"label": "Center"
}],
"default": "center"
},
{
"type": "header",
"content": "Inputs"
},
{
"type": "select",
"id": "input_size",
"label": "Size",
"options": [
{
"value": "small",
"label":"Small"
},
{
"value": "medium",
"label":"Medium"
},
{
"value": "large",
"label":"Large"
}
],
"default": "medium"
},
{
"type": "color",
"id": "input_bg_color",
"label": "Backgound color",
"default": "#FFF"
},
{
"type": "color",
"id": "input_color",
"label": "Color",
"default": "#121212"
},
{
"type": "checkbox",
"id": "input_borderless",
"label": "Borderless",
"default": true
},
{
"type": "color",
"id": "input_border_color",
"label": "Border color",
"default": "#000"
},
{
"type": "checkbox",
"id": "input_rounded",
"label": "Rounded",
"default": false
},
{
"type": "checkbox",
"id": "input_placeholder",
"label": "Placeholder only",
"default": true
},
{
"type": "select",
"id": "input_txt_position",
"label": "Text position",
"options": [
{
"value": "left",
"label": "Left"
},
{
"value": "right",
"label": "Right"
},
{
"value": "center",
"label": "Center"
}],
"default": "left"
},
{
"type": "header",
"content": "Image"
},
{
"type": "select",
"id": "img_position",
"label": "Position",
"options": [
{
"value": "left",
"label": "Left"
},
{
"value": "right",
"label": "Right"
},
{
"value": "top",
"label": "Top"
},
{
"value": "under-title",
"label": "Under title"
},
{
"value": "none",
"label": "None"
}],
"default": "none"
},
{
"type": "image_picker",
"id": "logo",
"label": "Logo"
},
{
"type": "range",
"id": "img_size",
"min": 0,
"max": 200,
"step": 5,
"unit": "%",
"label": "Size",
"default": 115,
"info": "A size over 100% is recommended."
},
{
"type": "checkbox",
"id": "img_margin",
"label": "Margin",
"default": false
},
{
"type": "header",
"content": "Icon close"
},
{
"type": "color",
"id": "icon_color",
"label": "Color",
"default": "#000000"
}
],
"blocks": [
{
"type": "contact_field",
"name": "Contact Field",
"limit": 3,
"settings": [
{
"type": "checkbox",
"id": "input_required",
"label": "Required",
"default": false
},
{
"type": "select",
"id": "input_type",
"label": "Type",
"options": [
{
"value": "first_name",
"label":"First name"
},
{
"value": "last_name",
"label":"Last name"
},
{
"value": "email",
"label":"Email"
}
],
"default":"email"
}
]
},
{
"type": "lang",
"name": "Labels and translation",
"limit": 3,
"settings": [
{
"type": "select",
"id": "lang_label",
"label": "Language",
"options" : [
{
"value": "FR",
"label":"FR"
},
{
"value": "EN",
"label":"EN"
},
{
"value": "ES",
"label":"ES"
}
],
"default": "FR"
},
{
"type": "header",
"content": "Text"
},
{
"type": "html",
"id": "lang_heading",
"label": "Heading",
"default": "
So my question is : using theme app extension, is it possible to create a section with blocks, and that these blocks are only usable by this section ? One of our pop-up block is to manage pop-up’s labels and traslations and it does not make sens to use it for an other section.
Thank you in advance.
David ROLLIER