Need help with Shopify schema (image block)

Solved
PamDigital
Excursionist
42 2 7

Hello,


I just created owl carousel but I want to choose my images with image picker schema. I want to use block schema for this feature. Anyone can help me how to do schema for block ? here is my codes;

<div id="urun-gorsel-slider" class="urun-gorsel-slider">
   <div class="col-4 text-center">
      <span class="urun-gorsel-slider">{{ section.settings.urungorselsliderbaslik }}</span>
   </div>
   <div class="container">
      <div	class="row">
         <div class="owl-container">
            <div id="urunslider" class="owl-carousel owl-theme">
               <div class="gorsel-slider"><img src="{{ section.settings.urunslidergorsel }}"></div>
               <div class="gorsel-slider"><img src="{{ section.settings.urunslidergorsel }}"></div>
               <div class="gorsel-slider"><img src="{{ section.settings.urunslidergorsel }}"></div>
               <div class="gorsel-slider"><img src="{{ section.settings.urunslidergorsel }}"></div>
               <div class="gorsel-slider"><img src="{{ section.settings.urunslidergorsel }}"></div>
               <div class="gorsel-slider"><img src="{{ section.settings.urunslidergorsel }}"></div>
            </div>
         </div>
      </div>
   </div>
</div>

And this is my schema;

"blocks": [
	         {
               "type": "image",
               "name": "Image",
               "settings": [
		         {
                   "type": "image_picker",
                   "id": "urunslidergorsel",
                   "label": "Slider Image",
                   "info": "Slider Image"
                 }
               ]
             }
             ],

   "presets": []
}

 

0 Likes
PamDigital
Excursionist
42 2 7

This is an accepted solution.

This worked if someone has this problem.

 

<div id="urun-gorsel-slider" class="urun-gorsel-slider">
   <div class="col-4 text-center">
      <span class="urun-gorsel-slider">{{ section.settings.urungorselsliderbaslik }}</span>
   </div>
   <div class="container">
      <div	class="row">
         <div class="owl-container">
            <div id="urunslider" class="owl-carousel owl-theme">
               {% for block in section.blocks %}
               <div class="gorsel-slider"><img src="{{ block.settings.urunslidergorsel | img_url: 'master' }}"></div>
               {% endfor %}
            </div>
         </div>
      </div>
   </div>
</div>

 

0 Likes