Hi @demor_support ,
Please change all code:
{% if section.blocks.size > 0 %}
{% for block in section.blocks %}
{%- if block.settings.image -%}
{%- assign img_object = block.settings.image -%}
{%- assign img_small = block.settings.image | img_url: '18x' -%}
{%- assign img_api = block.settings.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{%- else -%}
{%- assign img_object = 'blank.svg' | asset_url -%}
{%- assign img_small = 'blank.svg' | asset_url -%}
{%- assign img_api = 'blank.svg' | asset_url -%}
{%- endif -%}
{% if block.settings.link_text == '' and block.settings.link and block.settings.button_image == nil %}
{% endif %}
{% if block.settings.button_image %}
{%- assign img_button = block.settings.button_image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{% else %}
{% unless block.settings.title == '' %}# {{ block.settings.title | escape }}{% endunless %}
{% unless block.settings.description == '' %}
{{ block.settings.description }}
{% endunless %}
{% unless block.settings.link_text == '' %}
{{ block.settings.link_text | escape }}
{% endunless %}
{% if block.settings.link_text_popup %}
{% endif %}
{% unless block.settings.link_text_second == '' %}
{{ block.settings.link_text_second | escape }}
{% endunless %}
{% if block.settings.link_text_second_popup %}
{% endif %}
{% endif %}
{% if section.settings.height == 'use_image' %}
{% else %}
{% endif %}
{% if block.settings.link_text == '' and block.settings.link and block.settings.button_image == nil %}
{% endif %}
{% if section.settings.height == 'use_screen_full' %}
{% include 'svg-down' %}
{% endif %}
{% endfor %}
{% endif %}
{% if section.blocks.size == 0 %}
{{ 'home_page.onboarding.no_content' | t }}
{% endif %}
{% for block in section.blocks %}
{% if block.settings.button_image %}
{% endif %}
{% endfor %}
{% schema %}
{
"name": "Slideshow",
"settings": [
{
"type": "checkbox",
"id": "autoplay",
"label": "Auto-rotate slides",
"default": false
},
{
"type": "range",
"id": "autoplay_speed",
"min": 1,
"max": 15,
"step": 1,
"unit": "sec",
"label": "Change slides every",
"default": 8
},
{
"type": "select",
"id": "height",
"label": "Section height",
"default": "use_screen_two_thirds",
"options": [
{ "value": "use_screen_full", "label": "Full screen height"},
{ "value": "use_screen_two_thirds", "label": "Tall"},
{ "value": "use_screen_one_half", "label": "Medium"},
{ "value": "use_screen_one_third", "label": "Short"},
{ "value": "use_image", "label": "Image height"}
]
}
],
"blocks": [
{
"type": "image",
"name": "Slide",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Image",
"info": "Match size to other slides"
},
{
"type": "range",
"id": "overlay_opacity",
"min": 0,
"max": 100,
"step": 5,
"label": "Image overlay opacity",
"info": "Increase contrast for legible text.",
"default": 15
},
{
"type": "header",
"content": "Text"
},
{
"type": "text",
"id": "title",
"label": "Heading",
"default": "Image slide"
},
{
"type": "textarea",
"id": "description",
"label": "Subheading",
"default": "Tell your brand's story through images."
},
{
"type": "select",
"id": "text_align",
"label": "Alignment",
"default": "text-center",
"options": [
{ "value": "text-left", "label": "Align Left"},
{ "value": "text-center", "label": "Align Center"},
{ "value": "text-right", "label": "Align Right"}
]
},
{
"type": "select",
"id": "color",
"label": "Text color",
"default": "homepage--white",
"options": [
{ "value": "homepage--white", "label": "White"},
{ "value": "homepage--light", "label": "Light"},
{ "value": "homepage--splash", "label": "Accent"},
{ "value": "homepage--dark", "label": "Dark"}
]
},
{
"type": "header",
"content": "Button"
},
{
"type": "text",
"id": "link_text",
"label": "Text",
"default": "View products",
"info": "Leave blank to link entire image"
},
{
"type": "checkbox",
"id": "link_text_popup",
"label": "Enable popup",
"default": false
},
{
"type": "url",
"id": "link",
"label": "Slide link"
},
{
"type": "select",
"id": "button_style",
"label": "Button style",
"default": "btn btn--large btn--clear btn--square uppercase",
"options": [
{ "value": "btn btn--large btn--splash uppercase", "label": "Round"},
{ "value": "btn btn--large btn--splash btn--square uppercase", "label": "Square"},
{ "value": "btn btn--large btn--clear uppercase", "label": "Transparent round"},
{ "value": "btn btn--large btn--clear btn--square uppercase", "label": "Transparent square"},
{ "value": "btn btn--large btn--outline btn--square uppercase", "label": "Outlined square"}
]
},
{
"type": "header",
"content": "Button image (optional)"
},
{
"type": "image_picker",
"id": "button_image",
"label": "Button image",
"info": "1000 x 1000px .png max"
},
{
"type": "header",
"content": "Button 2"
},
{
"type": "text",
"id": "link_text_second",
"label": "Text",
"default": "Book a quote",
"info": "Leave blank to link entire image"
},
{
"type": "checkbox",
"id": "link_text_second_popup",
"label": "Enable popup",
"default": false
},
{
"type": "url",
"id": "link_second",
"label": "Slide link"
},
{
"type": "select",
"id": "button_style_second",
"label": "Button style",
"default": "btn btn--large btn--clear btn--square uppercase",
"options": [
{ "value": "btn btn--large btn--splash uppercase", "label": "Round"},
{ "value": "btn btn--large btn--splash btn--square uppercase", "label": "Square"},
{ "value": "btn btn--large btn--clear uppercase", "label": "Transparent round"},
{ "value": "btn btn--large btn--clear btn--square uppercase", "label": "Transparent square"},
{ "value": "btn btn--large btn--outline btn--square uppercase", "label": "Outlined square"}
]
},
{
"type": "header",
"content": "Button image (optional)"
},
{
"type": "image_picker",
"id": "button_image_second",
"label": "Button image",
"info": "1000 x 1000px .png max"
}
]
}
],
"presets": [{
"name": "Slideshow",
"category": "Image",
"settings": {
"height": "use_screen_two_thirds"
},
"blocks": [
{
"type": "image"
},
{
"type": "image"
}
]
}]
}
{% endschema %}
I helped you to add option ‘Enable popup’, if you want the button to go to the link and not show the popup, you just need to disable this option.
Hope it helps!