I have a channel (handle: "infopages") with entries. I have a channel (handle: "products") with entries. I have a category (handle: "productTypes")
Every entry from "infopages" has a category field, called "relatedCat". Every entry from "products" has a category field, called "relatedCat".
In the template for the infopages, I want to show all entries from "products" that share the same category. So if an infopage is related to the category "robotmowers", I want to show all the entries from "products" that are also related to "robotmowers". Every entry in every channel can be related to multiple categories, that's where the hard part comes in.
I could loop through the "relatedCat" field and get all the related entries from "products" in a loop. However, if multiple categories are selected, that means I possible get the same product entry more than once. I guess there must be a better way to do this?