My store sells appliances which each have multiple PDF documents we need to make available for download. To this end, I have defined two metaobjects in our store:
- A document metaobject represents a single PDF for download, with text and a thumbnail.
- A document_set contains a Metaobject list called .documents that references multiple document objects.
Currently, I am trying to set up a page template for the document_set metaobject, so that we can provide our customers with a link to a page that includes all of documents they need. Initially, my plan was to access the Metaobject list on document_set, and then iterate through it to display the text and thumbnails for all of the d****ocument metaobjects in the set.
In the process of setting this up however, I discovered a mysterious feature that I can’t find information about anywhere. When I connected the dynamic source to my custom content block, I had the option to choose documents, which is the name of the Metaobject list that contains all of the individual document metaobjects I needed to list. When I added this dynamic source, the icon for the block changed to the cyclical arrows seen in the screenshot, and the preview showed two copies of the HTML code (one copy for each document I have in the doc****ument_set.documents list).
This is fantastic, as it implies that Shopify has identified the dynamic source as an array, and is automatically iterating through the list to output a layout block for each entry. My issue unfortunately is that I have NO IDEA how to reference the current object in the list and display its metafields.
I did some investigation to see what was providing this iterator functionality in the hope that I could find documentation. In the page source, the cyclical arrow icon is referred to as a “repeater”, and the page template JSON for this block contains a key called “repeater” with its value set to “{{ metaobject.documents.value }}” (a reference to the Metaobject list I am trying to iterate over).
So although I can tell that this feature is called a “repeater”, I can’t find any info or documentation anywhere for how it works. It doesn’t seem to be a part of the Expanse theme I’m using, and I suspect that it is an undocumented part of Shopify itself. Does anyone have any info on this special form of block generation for list metafields? If not then I can go back to my original plan to simply write a for loop iterator, but this feature seems much more elegant and I’d like to learn how it works.

