How to make custom collection template content unique to the specific collection

How to make custom collection template content unique to the specific collection

captivation
Shopify Partner
1 0 0

Hi Support!

 

Is it possible to have a custom collection template Section and Block have unique data?

 

I created a video outlining the current behavior.

https://www.loom.com/share/72d3608740fe4efda35cf3beb3ff5553

 

My current Code for my custom collection template.

<section class="section section--page page">
    <div class="container container--medium">
        <div class="section__title section__title--center">
            <h1 class="section__title-text h2">{{ page.title }}</h1>
        </div>

        <div class="page__content rte">
            {{ page.content }}
            {% section 'icons-with-text' %}
        </div>
    </div>
</section>
 
My Code for my Custom Section plus blocks
-----
 
<h3>{{section.settings.heading}}</h3>
<p>{{section.settings.description}}</p>
{%for block in section.blocks %}
    <img src="{{block.settings.image | img_url: 'master'}}" />
{% endfor %}

{% schema %}
{
    "name": "icons with text above",
    "settings": [
        {
            "type": "text",
            "label": "your headline for the section",
            "id": "heading"
        },{
            "type": "richtext",
            "label": "your description",
            "id": "description"
        }
    ],
    "blocks": [
        {
            "type": "image",
            "name": "image block",
            "settings": [
                {
                    "type": "image_picker",
                    "label": "your image",
                    "id": "image"
                }
            ]
        }
    ],
    "presets": [
        {
            "category":"image",
            "name": "icons with text"
        }
    ]
}
{% endschema %}
Replies 0 (0)