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 |
---|---|
33 | |
27 | |
20 | |
9 | |
9 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By