Add Link to Image on Fashe Theme

Solved
BenPaddock
Tourist
6 0 5

Hello, I have been stumped trying to figure out how to add a link to the images on my ad-banner section.

I was able to code in a box where I could add a link but when I clicked the image nothing, I am assuming it is because there is no preset so it doesn't know what to do with the link:Screen Shot 2021-06-15 at 1.08.56 PM.png

This is what the ad-banner.liquid code looks like currently with my changes:

 

 

 

 

 

<!-- Banner -->
{% include section.settings.feature_advert_design %}
{% schema %}
{
  "name": "Ad banner section",
  "class": "index-section index-section--flush",
  "max_blocks": 6,
  "settings": [
    {
    "type": "select",
    "id": "feature_advert_design",
    "label": "Select Design",
    "options": [
      {
      "value": "feature-advert3",
      "label": "Design 3 (Three images )"
      },
	  {
      "value": "feature-advert6",
      "label": "Design 6 (Six images )"
      }
    ],
    "default": "feature-advert6"
    }
  ],
  "blocks": [
    {
      "type": "image",
      "name": "Image slide",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "Image",
          "info": "ad image"
        },
		{
          "type": "url",
          "id": "image_link",
          "label": "Image link"
       }
      ]
    }
  ],
  "presets": [{
    "name": "Ad banner section",
    "category": "Image",
    "blocks": [
      {
        "type": "image"
      },
      {
        "type": "image"
      }
    ]
  }]
}
{% endschema %}

 

 

 

 

 

Any help is appreciated!

KetanKumar
Shopify Partner
20367 2109 7659

@BenPaddock 

sorry for that issue please share full html code also this section so i will update 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
BenPaddock
Tourist
6 0 5

The code I attached was all the code in the ad-banner.liquid file. If you need the theme.liquid or any other sections, please let me know

KetanKumar
Shopify Partner
20367 2109 7659

@BenPaddock 

Yes, please give me this file also 

{% include section.settings.feature_advert_design %}
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
BenPaddock
Tourist
6 0 5
"1503231244573": {
        "type": "ad-banner",
        "blocks": {
          "1506803279562": {
            "type": "image",
            "settings": {
              "image": "shopify:\/\/shop_images\/1_Mockup.jpg"
            }
          },
          "1506803308948": {
            "type": "image",
            "settings": {
              "image": "shopify:\/\/shop_images\/2_mockup.jpg"
            }
          },
          "1514473881970": {
            "type": "image",
            "settings": {
              "image": "shopify:\/\/shop_images\/3_mockup.jpg"
            }
          },
          "1514473919786": {
            "type": "image",
            "settings": {
              "image": "shopify:\/\/shop_images\/4_mockup.jpg"
            }
          },
          "1514473952044": {
            "type": "image",
            "settings": {
              "image": "shopify:\/\/shop_images\/5_mockup.jpg"
            }
          },
          "1514474049400": {
            "type": "image",
            "settings": {
              "image": "shopify:\/\/shop_images\/6_mockup.jpg"
            }
          }
        },
        "block_order": [
          "1506803279562",
          "1506803308948",
          "1514473881970",
          "1514473919786",
          "1514473952044",
          "1514474049400"
        ],
        "settings": {
          "feature_advert_design": "feature-advert6"
        }
      },

I found this in Config -> settings_data.json

Is this what you need?

KetanKumar
Shopify Partner
20367 2109 7659

@BenPaddock 

no its wrong code 

can you please sent your theme zip so i will check and update code

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
BenPaddock
Tourist
6 0 5
KetanKumar
Shopify Partner
20367 2109 7659

@BenPaddock 

great thanks for code i will update and let you know

 

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
BenPaddock
Tourist
6 0 5

Any updates Kentan?

KetanKumar
Shopify Partner
20367 2109 7659

This is an accepted solution.

@BenPaddock 

sorry for late reply 

yes have just update this file code feature-advert6.liquid below update code

<section class="banner bgwhite p-t-40 p-b-40" data-section-id="{{ section.id }}">
  <div class="container">
    <div class="row">
      {% if section.blocks.size > 0 %}
      {% for block in section.blocks limit:6 %}
      {% cycle '<div class="col-sm-10 col-md-8 col-lg-4 m-l-r-auto">', '' %}
      <!-- block{{forloop.index}} -->
      <div class="block1 hov-img-zoom pos-relative m-b-30">
        {% if block.settings.image_link != blank %}          
        <a href="{{ block.settings.image_link }}" {{ block.shopify_attributes }}>
          {% endif %}
          {% if block.settings.image != blank %}
          <img src="{{ block.settings.image | img_url: 'master' }}" class="" alt=""/>
          {% endif %}
          {% if block.settings.image_link != blank %}          
        </a>
        {% endif %}
        <div class="block1-wrapbtn w-size2">
          <!-- Button -->
          {% if block.settings.link != blank %}          
          <a href="{{ block.settings.link }}" class="flex-c-m size2 m-text2 bg3 hov1 trans-0-4" {{ block.shopify_attributes }}>{{ block.settings.link_text }}</a>
          {% endif %}
        </div>
      </div>
      {% cycle '','</div>' %}
      {% endfor %}
      {% endif %}
    </div>
  </div>
</section>

see attachment 

where is it this file code

Design-practice _ Edit _ Theme Export Buffed Up Fitness Apparel Myshopi... _ Shopify.png

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing