Workaround for nested repeaters needs

Hi, everyone. I am trying to figure out a solution for a requirement that I originally planed on using nested repeaters to solve. I just learned from an older post that repeaters can’t be nested, and now I’m not sure what to do for this requirement. Really appreciate any help I can get.

I have two data sets. One data set is of clothing items. And another data set is of categories that clothing items can belong to. For example, jacket, jeans, sweater, t-shirt, etc.

In the clothing item collection, I created a reference field pointing to the category collection. Multiple selection enabled, since an item can belong to multiple categories: For example, a sweater jacket.

Now on the product list page, I am using a repeater to list all the clothing items, and I want to show the multiple categories they belong to. I was planning on using a repeater of categories inside the repeater of the clothing item, but since they can’t be nested, and from the editor, I can’t connect page element to multi-select reference field, how can I show the multiple categories of these clothing items on the list view? Also, these categories need to be clickable that take users to the category main page…

Thanks a million in advanced.

Won,

You might consider using a two column strip where the first column would be the clothing item repeater and the second column would be a categories repeater. It would require that the user select the clothing item in order to see the categories on the right column using set filter if you are using datasets. That may or may not be possible to do in an intuitive way for a product page.

Another option, involving more coding, would be to include the maximum amount of text elements that you might have stacked vertically in the product repeater below the product item and they all start their lives collapsed and with generic text. In code, you would assign the category and a link to the appropriate product page to each one in turn and expand them as you do in the onItemReady event.

Other options would be to nest a checkbox group or table to display in each item of the products repeater. Though not ideal in some respects (and for different reasons), it would be the one-to-many display of data that you are wanting.

All of these options would be clickable to bring up the category page.