Assigning Metaobjects to the same collapsible block

Hi,

I have an e-commerce store that has a page set up for every ingredient we use. I would like to display each used ingredient on each product page under a collapsible column.

I have set up a metaobject for each ingredient: That contains a hyperlinked text and color - the link then connects to the ingredient page.

I have then set up a metafield in each product where I can assign multiple ingredients to one product.

When I content these metaobjects to my theme- I have run into a problem where it auto populates a new collapsible field for every ingredient assigned where I just want them to be displayed in one block

Any idea how to merge these into one?

It’s tough to say without seeing your theme’s code exactly, but it looks like there is a forloop issue. I’m guessing the code says to do something like:

->for each ingredient, output accordion heading titled ‘ingredient’ and output ingredient

where it should do something like:

→ output accordion heading titled ‘ingredient’, for each ingredient, output ingredient

Sorry for the vagueness, but I hope it’s helpful!