Reverse collection binding

Very curious about webflow expanding on collection usage. In particular I have a restaurant as a client. They have menu categories (like beer, burgers, sandwiches, etc.). Then they have menu items (IPA, Cheeseburger, Club Sandwich). The way we configured the CMS is that from the menu item you can select one or multiple categories, which from a usability perspective makes a ton of sense.

I want to make a printable page that shows all menu items grouped by category, But when I first add the category collection, then try to add the menu items collection, it does not recognize the link back. Basically it works with a one to many, but not a many to one.

Alternatively I thought I could bind a drop down (menu component not form box) so they could choose the menu they wanted but finding it difficult to bind a selection to filtered collection. Keep in mind these are not the pre-made collections pages. These already contain a lovely web experience, just trying to make a text only printable menu for those that want it.


Here is my public share link: LINK
(how to access public share link)

1 Like

It sounds as if you are trying to nest collections, like so:

Categories collection
… Menu items

It seems like nesting only works if there’s a multi-reference field or multi-image field in the collection, but not sure now without trying and testing again.

Assuming that the categories generally don’t change, my suggested approach would be to add separate collections to the page, one for each category. Then, use conditional visibility to only show items in that category. If categories change, this page would need to be adjusted manually.

Yes, have the nesting worked out, but I’m hoping to reverse nest so to speak. So, it’s way easier to select a category (from a multi-select collection) for each menu item (think cheeseburger) than it is to assign all the menu items to a category collection. It all works fine with the exception of wanting to create a page that shows the category and all the items under it.

2 Likes

@John_Jackovin did you ever figure out how to do this?

1 Like

@John_Jackovin You might find this helpful:

Ok, so I figured out how to do this. It’s quite simple. You have the parent item which is the categories, then the menu items. I am assuming one dish can only belong to one category, which means you can easily show the related item. But a category can have multiple relations.

To get this done:

  1. On the category Page Template - Create a collections list.
  2. Select the [Menu items] from the list of collections
  3. Go to settings, and find the filters. There you will see an option [Menu Categories], or whatever you called the refference field inside your menu items collection. then for the second option [contains] and for the third option (this is the one that will make things happen [current menu category].

Since it’s a multi refference field, you will have multiple menu items to show under one collections page, it makes sense to have to use a collection list to show them.

I hope this helps.