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 |
---|---|
23 | |
22 | |
9 | |
7 | |
7 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023