Add a HTML block to Image-With-Text Section

Hi there. I would like to add a HTML block to the options in the Image with Text section. I can just about navigate through the code, and i already managed this on the footer, but cant seem to get it right on the section.

Domain: reporting.io

To be clear, the goal is to be able to add html as a block here:

Appreciate any help i can get.

@jackreports May this help you.

{%for block in section.blocks%}

    

        

            
            ### {{block.settings.testi-title}}
            

{{block.settings.testi-text}}

        

    

{%endfor%}

{% schema %}
{
   "name":"Custom Testimonial",
   "settings":[
      {
         "type":"text",
         "id":"testi-title",
         "label":"Testimonial Title",
         "default":"Testimonial"
      }
   ],
   "blocks":[
      {
         "type":"quote",
         "name":"Testimonial",
         "settings":[
            {
               "type":"text",
               "id":"testi-title",
               "label":"Author",
               "default":"mycodemagic"
            },
            {
               "type":"richtext",
               "id":"testi-text",
               "label":"Text",
               "default":"

Add customer reviews and testimonials to showcase your store’s happy customers.

"
            },
            {
               "type":"image_picker",
               "id":"testi-img",
               "label":"Logo image"
            }
         ]
      }
   ],
   "presets":[
      {
         "name":"New Testimonials",
         "category":"Text",
         "blocks":[
            {
               "type":"quote"
            },
            {
               "type":"quote"
            },
            {
               "type":"quote"
            }
         ]
      }
   ]
}

{% endschema %}

Thanks for this, where should i place? in image-with-text liquid?

Got it to work with the following: All to be applied in image with text liquid.

First add these two lines to get the HTML block as an option:

Add the block settings code.

{%- when 'html_content' -%}
    {{ block.settings.html_area }}
                {%- endcase -%}

			
			
			{
  "type": "html_content",
  "name": "HTML Content",
  "settings": [
    {
      "type": "html",
      "id": "html_area",
      "label": "Custom HTML",
      "default": "

Some HTML content

"
    }
  ]
},

just about managed @WoodyDev

Ahh perfect!

Liquid isn’t my strong point, but I’m glad you found a solution!

1 Like

I did this and it messed up my buttons! How can i fix this?