You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other platforms and frameworks have the ability to place code within a placeholder element somewhere else on the theme.
October CMS does this using {% placeholder xyz %}, Astro does this using <slot name="xyz" />.
It makes sense for Shopify to allow this due to the hugely dynamic nature of sections and blocks.
Right now, to include dynamic styles on a section, I need to write them within the section file, which means the style and script definitions are littered everywhere.
A Liquid slot tag would allow developers to better optimise their themes by allowing specific blocks of code to go in specific areas.
yield? content_for? a couple patterns from rails-land that feel related
benjaminsehl
changed the title
Request for suggestions: Liquid slot tag to render contents in predefined places
Request for improvements: Liquid slot tag to render contents in predefined places
Dec 11, 2024
Other platforms and frameworks have the ability to place code within a placeholder element somewhere else on the theme.
October CMS does this using
{% placeholder xyz %}
, Astro does this using<slot name="xyz" />
.It makes sense for Shopify to allow this due to the hugely dynamic nature of sections and blocks.
Right now, to include dynamic styles on a section, I need to write them within the section file, which means the style and script definitions are littered everywhere.
A Liquid
slot
tag would allow developers to better optimise their themes by allowing specific blocks of code to go in specific areas.Examples
Styles
slider.liquid
The text was updated successfully, but these errors were encountered: