Venture Theme Adding new Custom Content Block

Highlighted
New Member
6 0 0

Hi,

I have created a new section that includes a heading, image and URL. However, I am trying to figure out how to add this section to my section/footer.liquid as a dynamic content block. As I am aware, you are unable to add sections within sections. How do I go about doing this?

0 Likes
Highlighted
Shopify Partner
21 3 3

Hi!

When creating a section, you can make a template in a snippet and include it as in any section or in a section block using {% render "your_snippet_name" %} / Documentation

The "your_section_name.liquid" might look like this:

 

{% render "your_snippet_name" %}

{% schema %}
  {
  }
{% endschema %}

 

And footer.liquid

 

{% comment %}
  Footer section code
{% endcomment %}

{% for block in section.blocks %}
  {% case block.type %}
    {% when 'your_block' %}
       {% render "your_snippet_name" %}
  {% endcase %}
{% endfor %}

{% schema %}
  {
  }
{% endschema %}

 

 

❤️ JS
0 Likes