Streaming live at 10am (PST)

CMS reference forth and back


#1

hey guys!
i am working on a food website. i have a collection for recipes and a collection for foods. so the tomato soup has its own recipe template with instructions on how to cook it and the tomato itself has its own food template with information about energy, fat, ….

now i want to reference from both templates to the other. so on the tomato template the user can find a link to tomato recipes and on the tomato recipe template the user can find a link to the tomato template. right now i have a multi reference field to recipes in the food collection. so i can display recipes containing the food on the food template.

my question is: how can i achieve it the other way round, without another reference and entering the same information again in the recipe collection? why is there no such opportunity to say "display all foods the recipe is referencing to"?

i hope somebody understands what i mean!
thanks in advance!
jaro
:blush:


#2

Don't you need a multi reference the other way? in the food collection, referencing all recipe where the food appears...

I think I'd be better thinking of this with your sharing link actually...


#3

Yes that's an easy one :smile:


#4

that way i would always have to edit every single food item in the food collection when i write a new recipe. but why do that? i am already linking the two in the first step when i write the recipe..


#5

#6