Liquid, JavaScript, themes, sales channels
hi everyone
this is schema
{% schema %}
{
"name": "Third section",
"settings": [
{
"id" : "myfav",
"type" : "text",
"label" : "top left heading"
},
{
"id" : "myshop",
"type" : "text",
"label" : "top right heading"
}
],
"blocks": [
{
"type": "image_picker",
"name" : "Image Slide",
"settings" :[
{
"id" : "textone",
"type" : "text",
"label" : "Text"
},
{
"id" : "imageone",
"type" : "image_picker",
"label" : "Image right"
},
{
"id" : "collection",
"type" : "collection",
"label" : "collection"
}
]
}
],
"presets": [
{
"name": "Top Banner",
"category": "Custom Sections"
}
]
}
{% endschema %}
this is condition
<span class="image_arrows_1">{% if block.settings.textone==blank %} {% elsif collections[block.settings.collection].title %}{{collections[block.settings.collection].title}}{{ collection.title }}{% endif %}</span>
you can see in the picture over the water text can change to Ahmad58
anyone help me to condition
Solved! Go to the solution
This is an accepted solution.
Hi @Ahmad58,
Please change code:
<span class="image_arrows_1">
{% if block.settings.textone != blank %}
{{ block.settings.textone }}
{% elsif collections[block.settings.collection].title %}
{{collections[block.settings.collection].title}}{{ collection.title }}
{% endif %}
</span>
Hope it helps!
Hello,
Yes your schema is nicely formatted, now you need to put it into assets (in theme).
Then call it like {{ assetname.xxx }}, it would be a good asset start
Have fun with Shopify,
This is an accepted solution.
Hi @Ahmad58,
Please change code:
<span class="image_arrows_1">
{% if block.settings.textone != blank %}
{{ block.settings.textone }}
{% elsif collections[block.settings.collection].title %}
{{collections[block.settings.collection].title}}{{ collection.title }}
{% endif %}
</span>
Hope it helps!
User | RANK |
---|---|
33 | |
25 | |
17 | |
9 | |
9 |
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023