How can you get the section_id of the section you want to dynamically render using the Section Rendering API. Since the theme app extensions let you create app blocks only, you don’t really know the section where the block will be added and you can’t make use of the name of the block eg. on a section my_custom_section.liquid, we can use my_custom_section as the id in a static section defined in the Section directory of the theme files.
How can i also pass in custom parameters to the section when using the Section Rendering API without relying on the content_for_header object workaround defined here. Shopify allows passing of their predefined parameters like filter.v.price.gte , filter.v.price.lte and sort_by as shown here .The request object in liquid doesn’t give you access to query parameters also.
I have tried making use the solutions that are offered in this community discussions but nothing seem to work except the content_for header workaround https://community.shopify.com/c/online-store-and-theme/how-to-use-the-section-rendering-api/td-p/806580
Munashe Stabnashia Nzira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.