Liquid, JavaScript, themes, sales channels
What does this do and when should I be using it in my sections? Is it just whenever I call a block in my html? I've read the doc and still don't understand what it exactly does and when and why it is needed.
Solved! Go to the solution
This is an accepted solution.
Hi @TheThisThat ,
It helps to display block in file section. Refer https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/sections/#customize-your...
You can refer to this code, it will show blocks when declaring schema, ex: https://github.com/Shopify/dawn/blob/main/sections/collection-list.liquid
https://i.imgur.com/sYe3MD5.png
Hope it clear to you.
If my answer can help you solve your issue, please mark it as a solution. Thank you and good luck.
This is an accepted solution.
Hey @TheThisThat,
The accepted solution here didn't really seem to clear things up, so I did a little digging myself.
This article states:
We'll also use the block.shopify_attributes to add data attributes to the element. The theme editor's JavaScript API uses a block's shopify_attributes to identify blocks and listen for events.
This is an accepted solution.
Hi @TheThisThat ,
It helps to display block in file section. Refer https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/sections/#customize-your...
You can refer to this code, it will show blocks when declaring schema, ex: https://github.com/Shopify/dawn/blob/main/sections/collection-list.liquid
https://i.imgur.com/sYe3MD5.png
Hope it clear to you.
If my answer can help you solve your issue, please mark it as a solution. Thank you and good luck.
This is an accepted solution.
Hey @TheThisThat,
The accepted solution here didn't really seem to clear things up, so I did a little digging myself.
This article states:
We'll also use the block.shopify_attributes to add data attributes to the element. The theme editor's JavaScript API uses a block's shopify_attributes to identify blocks and listen for events.
For anyone who lands here in 2023, the answer to this question is documented here: https://shopify.dev/docs/api/liquid/objects/block#block-shopify_attributes
User | RANK |
---|---|
38 | |
28 | |
13 | |
11 | |
8 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023