Structure CMS by category

Hi,

I’m trying to make a CMS powered wine list, but I’m having some issues. The structure I would like to achieve looks something like this:

(H1) France
(H2) Bordeaux
(p) French wine from Bordeaux 1
(p) French wine from Bordeaux 2
(p) French wine from Bordeaux 3
(p) French wine from Bordeaux 4
(H2) Burgundy
(p) French wine from Burgundy 1
(p) French wine from Burgundy 2
(p) French wine from Burgundy 3
(p) French wine from Burgundy 4

The idea is that each country, district and subdistrict only appears once in the list, followed by all wines from the respective areas.

I have managed to make a working prototype of this structure (www.restaurantiris.no/winelist), but I’m relying on strict control of the structure of the data from excel. In the current setup I’m using fields for “First country“, “First district” and “First subdistrict” that all are equal to 1 if the wine listed is the first one to be listed under the current area, and 0 if not. I then use conditional visibility to hide the subheading for all wines with “First …” = 0.

There are of course several challenges with this apporach, but the greatest is it is very time consuming to update the winelist.

I have also tried adding a different collection list for each subdistrict, but I’m limited by the max 20 collection lists on each page.

Anyone have any ideas on how to resolve this issue in a more elegant way?

Best,
Tobias

Please note that the site is desktop/tablet only at this time.

Preview link here: Webflow - Iris restaurant
Live site here: Winelist

There are a number of ways to do this, but

What I’d try doing first;

  • Country table
  • Region table, single-ref to Country
  • Wine table, single-ref to Region

On your page, output all 3 as collection lists.

Use Finsweet’s CMS nest to attempt to group the regions into countries, and the wines into regions. I have not tried this however.

An alternative is to just write your own nesting javascript. You may need some script anyway to e.g. remove empty headings.

Hi,

Thanks for the suggestion!

I’ve tried implementing the solution with the Finsweet nest functionality, however if I understand correctly, it requires me to reference all wines in the sub region. That is: the sub-region needs to have a multi reference field with all wines in that region. This makes maintaining the collection quite a pain.

I did, however, manage to do it with JS. Thanks for the tip!

1 Like