Replies: 3 comments
-
|
Useful additional discussions around this topic: |
Beta Was this translation helpful? Give feedback.
-
|
I had the same thought exactly just a few hours ago ahah Knowing Shopify, I'm pretty sure they're headed this way while keeping the backward compatibility. In the future, you will surely be allowed to write Would not even be surprised that the new |
Beta Was this translation helpful? Give feedback.
-
|
Hey Thomas! This is something we are considering. It makes sense to consolidate things and make for a more consistent overall API. Keep an eye out for updates as we further build on the Theme Blocks feature. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Slots are a pretty well-known pattern in web development by now. We know they can help stave off configuration bloat and allow for better scoping of components.
{{ content_for: "blocks" }}has been introduced as a first of its kind. There has been other similar tags like:{{ content_for_additional_checkout_buttons }}{{ content_for_header }}{{ content_for_index}}{{ content_for_layout }}{{ sections 'name' }}These are all slots!!
There is clearly a need for slots here, and the need will continue to extend out beyond what we can anticipate based on our present needs. Why not make this slot proposal the one to end them all?
{{ content_for: "blocks" }}is basically the default slot for a block. It could be anticipated that block could benefit from the flexibility of having multiple slots, so why not allow them to declare their own?Looking to HTML slotting example here for inspiration
Beta Was this translation helpful? Give feedback.
All reactions