Liquid, JavaScript, themes, sales channels
Hi, I've set up a "section" aka content schema for a coming soon page. The relevant section looks like this:
"blocks": [
{
"type": "Item",
"name": "Item Label in the Theme Editor",
"settings": [
When the request came through, I didn't expect the admin to enter 50 different products.
The blocks are now somewhat unmanageable in the theme editor. We know that each one of these has it's own data, how can I either get an option to label a block as it's added, or pick up one of the settings?
Solved! Go to the solution
This is an accepted solution.
Solving my own posts is becoming a pattern. I guess I'm just hoping that I help someone else alone the way.
Apparently, if one of your elements inside a block is given the id of title, it's automatic.
"settings": [
{
"type": "text",
"id": "title",
"label": "Title",
"info":"optional"
},
"id":"title"
That's a pretty obscure and nuanced feature.
Feels more like a cheat-code than a feature. I would think it would warrant more than a sentence here but whatever:
https://shopify.dev/tutorials/develop-theme-use-sections#section-title
Is there any way to label a block as it's added? or pick up one of the values entered?
please help
Is there any way to label a block as it's added? or pick up one of the values entered?
Bueller? Bueller?
This is an accepted solution.
Solving my own posts is becoming a pattern. I guess I'm just hoping that I help someone else alone the way.
Apparently, if one of your elements inside a block is given the id of title, it's automatic.
"settings": [
{
"type": "text",
"id": "title",
"label": "Title",
"info":"optional"
},
"id":"title"
That's a pretty obscure and nuanced feature.
Feels more like a cheat-code than a feature. I would think it would warrant more than a sentence here but whatever:
https://shopify.dev/tutorials/develop-theme-use-sections#section-title
Thanks will try this was looking for this solution
Just changed one to title but didn’t seem to fix it. Al still have the same name
I've noticed that it works if you use id="text" to match the input type input="text". The same goes for image. Using id="image" will use the image as the block icon. I would also like to see some documentation for this!
{
"type": "text",
"id": "text",
"label": "Text"
}
{
"type": "image_picker",
"id": "image",
"label": "Image"
}
User | RANK |
---|---|
35 | |
24 | |
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