Liquid, JavaScript, themes, sales channels
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
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"
}
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022