Restaurant CMS menu (Possible code solution)

Hi guys,
I am making a restaurant site and a little stuck on the menu page.

I think this has been discussed already and I think there is no way to do what I ask, however just so I can sleep tonight I would like to get a second opinion please.

I have a menu, it is not too big, it is split into groups, Pizza, Panini, Garlic bread, Drinks e.t.c.
Each group has multiple items inside it.

The client wants to be able to add not only new food items but new groups too.
So I have made a collection of food items, and a collection of just the food groups. The food groups has a multi reference field that connects the relevant food items to the relevant group.

So the Pizza collection group has a multi reference where it references all of the pizzas in the food item collection.

The problem is that my multi reference is limited to 5 items.

There is another way for me to achieve something similar and that is to add a category to the food items and filter the items in the collection list settings. But this requires my category headings to be hand written not driven by the CMS.

So am I correct in assuming that this is pretty much the end of the line for this solution and there is no way for me to give my client the ability to create groups as well as add menu items themselves?

1 Like

Why are you limited to 5 items? Also, the category could be a reference instead of an option.

Can you share a read-only link?

1 Like

You’re limited to 5 reference fields in a collection, but the referenced collection itself has one only limit: the limit of CMS items, so 2000 for a CMS plan and 10000 for a business plan.

Check limitations here:

https://www.man1fest.me/komparator

1 Like

Hi guys, thank for responding.

I have made a mockup of my problem here

https://preview.webflow.com/preview/bens-beautiful-project-ea3c92?utm_medium=preview_link&utm_source=designer&utm_content=bens-beautiful-project-ea3c92&preview=9ee7b93b0fe020fd5209172574c94bcd&mode=preview

As you can see in the preview, I am limited to 5 multi reference items as you say.

But is there a better way of doing what I am attempting here? I would like to allow my client to add new food groups as well as food items, but the only way to nest a collection inside another collection is via a multi reference and that is limited to 5. I have tried other ways but nothing I found allows both, either the food items or the group name has to be ‘hard coded’ and can’t be CMS driven.

What do you think?

Thanks,
Ben

Hey Aerodyll,

You have this set up correctly, I wouldn’t see any other way of doing it unless you wanted the menu item to reference the menu group, but I think the way you did it is probably easiest.

The confusion here is you’re mistaking multi-reference fields with collection items. The multi-reference field actually connects 2 separate collections together.

You have a collection for food items and a separate collection for food groups, which you do have set up correctly.
You then use a multi-reference field on the food group to assign the food items that belong to that group, which you are also doing correctly.
Each of these collections can have up to 100 items in them.

Does this make sense?

Thanks for responding.

I understand that collections can have up to 100 items. But as you can see in my example, each food group is displaying 5 items on the page, but each group actually has 6 food items assigned to it. I believe this is a limitation of a multi reference field as I cannot get it to display more than 5 items on page regardless of how many I assign to it.

Hey Aerodyll,

So I haven’t seen this problem specifically and I’m glad I came across it. I had no idea you can only display a max of 5 multi-reference fields!! It honestly seems like kind of a ridiculous limitation. There are certain things with webflow where you just hit a wall and developing on a platform via code (like Wordpress) is just a bit easier… anyway that’s a tangent for a different day.

I’m trying to think of a solution, but can’t think of one on the top of my head. I would recommend looking on other forum posts to see if someone has found a solid solution to this. :frowning_face: I was think the way to remedy this is to instead use a reference field or multi-reference field on the menu item to connect to the menu group. But then I was trying to picture how to display it and we’d basically be in the same conundrum. I wish I could be of more help!! Why they would create this limitation is beyond me!!

I also found this: https://preview.webflow.com/preview/cafe-template?preview=4cf0e40785ce56ea6b0e460f8b107220&pageId=59f1da298464770001a43d74

You can kind of see how they’re displaying the categories. Unfortunately each menu group won’t automatically be created on the page. Every time a menu group would be created you’d need to add that particular section filtering the menu group you’d want displayed.

No problem at all, thanks for trying, it is appreciated.

As it was suggested above, you can get beyond the 5 item limitation by buying a business plan, but only up to a max of 10 which is still restrictive. There will of course be reasons for this but I wasn’t invited to that particular meeting at Webflow HQ.

The second option you sent it how I did it originally, but I wanted to make it fully CMS driven so the client wouldn’t need to call me again for changes to the menu, but I guess it isn’t possible right now.

I do wonder whether you could do this with code, still use the CMS but pull the multi reference field items into the page somehow. But it is beyond me just yet.

After some searching it seems this just is not possible. I shall have to find a workaround, in this case probably just not allow the client to add new menu categories.

Apologies for triple posting on my own thread. But out of curiosity and for my own studies.

Using custom code, would it be possible for me to bypass the multi reference limit but still use the Webflow CMS?

Hi @Aerodyll – I could be very very wrong, but have you considered flipping your logic in regards to the multi fields?

Consider building one collection with all of the individual menu items, uncategorized, first. Then build a “category” collection that contains all your labels (Pizza, Panini, Garlic Bread, Drinks, etc). You can then go back into your menu items collection and add one multi-reference field, connected to the “category” the item belongs to.

Then you can use the filtering mechanism in the designer for your collection list items to filter out to display items by their category. For example, one collection list in your menu could filter everything but items with the multi-reference field tag of “Pizza”.

Would that solve your design problem?

Again, apologies if I’ve misunderstood the issue and where you’d like to end up!

Thanks for the suggestion Alexander_Allrich. That was my first attempt at this.
That solution does allow the client to create food items, it may even allow them to change the name of the food groups. And it sorts them too. But it doesn’t allow the client to create new groups themselves.

I did stumble across a different solution where I would create a menu with a large number of empty ‘dummy groups’ that the user can turn on using switches. Once the group is turned on they would then be visible and be able to edit the name of the group and they could also add the same group to sorting and do that stuff too. But I feel this requires too many steps on the client side.

I have never wanted to code myself more than when situations like this arise. I am not sure though how a traditional developer would solve this issue. If they would just buy a plugin for it or make something themselves.

@vincent I understand reference field is limited to 10 in Business CMS. But i’m using Multi reference field and i’m seeing just 5 items in it (even though i have 10 items mapped into it).

So does that mean multi-reference field has special limitations apart from a simple reference field?

I’m using it in the nested collection, so would that be a reason why i’m seeing just 5 items instead of 10 items?

Can you please clarify this?
Read-only link

The page i’m referring to

Exactly that. This limitation doesn’t yet appear on komparator, I’ll add it.

2 Likes