Access blocks from a different shopify section

Hello all,

It looks like what I may be trying to accomplish may be a little outside the scope of how the sections are intended to be used but hopefully it’s still possible.

I am trying to develop a carousel that shows customer reviews from external sources such as trustpilot. The aim is to add reviews manually to this carousel along with additional media such as an image of the product offered. This is not a problem to implement. However, to save the need to add the same review block at all locations the review carousel appears I want to pull the review blocks from a different liquid file.

Is this possible?

e.g. from “lc-reviews.liquid” I’m trying to get data from “reviews.liquid” via the following:

{% for block in reviews.liquid.blocks %}

{% for block in reviews.section.blocks %}

{% for block in reviews.blocks %}

Is there perhaps another way I could store the details centrally and always pull from the same source on all locations this review carousel appears?

hello there

it is possible to store the reviews centrally and pull the data from the same source on all locations where the review carousel appears. One approach to achieve this is to use a Shopify app or custom solution to store the reviews and associated data (such as images) in a separate database or file outside of the theme files. This data can then be accessed and displayed in the review carousel section of the theme by making API calls to the app or reading from the external file.

Alternatively, you could create a reusable snippet for the review block and include it in multiple liquid files. This would allow you to maintain a single source of truth for the review block code and easily update it across all locations where it appears. You can include the snippet in your theme using the {% include %} tag and passing in any necessary variables.