Display collection info in repeater

I have a collection with three columns (nameCourse(text), teacher(reference), order(number)).

If I have two rows that contain the same nameCourse but hace different teacher, how can I display then in the same item in a repeater with just two texts for teachers, one for each.

Do I have to include the collection in my page or can I just make use of wixData in code to connect repeteater items to the collection?

Thanks in advance!

Hello.

If you use data binding then you will need to add a dataset to your page and connect it to your repeater items.

You can also use data API to display collection items to a repeater.

Good luck!

Hello Sam! Thanks for answering. I know those tools to display collection items. What I don’t know how to do is to display two different rows from my collection in the same repeater item if they share a property. For example:
CourseName | Teacher
Piano | Martha
Piano | Greta

And then show only one repeater item for Piano with Teacher 1 and Teacher 2.

And then, there’s the difficulty that teacher is a reference column.

I have no idea how to display that in this way haha. Thanks!