Filter collection List with custom CMS attribute

Hi, I want to filter collection list items (ecommerce products) on a CMS collection list template page with an custom attribute which takes the value from the current collection page name.

  1. I added a custom field (“Antique-Collection-Name”) to the CMS collection.

  2. On the collection list template page I added a collection list which is connected to the CMS collection. The connection works and I see all products.

  3. I added a custom attribute to the collection list. The attribute is called “current-collection-name” and the value is the name of the collection list (which I use as template page).

  4. Now I want to filter the items of the collection list based on the custom attribute: Antique-Collection-Name >> Equals >> current-collection-name

But it doesn’t show any item. Is there maybe a way I need to identify that current-collection-name is an attribute? I tested “current-collection-name” or =current-collection-name but no clue.

Thanks for your help!


Bildschirmfoto 2024-03-23 um 00.09.59

Hi Chrisoph,

Webflow’s custom attributes feature is for setting attributes on an element, it doesn’t have any relevance to the collection list filtering feature.

What is it that you’re trying to accomplish?

It sounds like you have a CMS Collection and the ECom Products collection, and you’re trying to display a set of products on your CMS collection page that relate to that item?

If so a ref field is probably the way to go. You can put a custom field in your ECom Product collection that references your CMS item, and it will be easier to admin and filter by.

2 Likes

@memetican thanks a lot! very straight forward and clear feedback! Such an easy solution! I don’t know why I tried it with the complex workaround. Best, Christoph

1 Like

Wow I had exactly the same question and was already thinking of adding custom code after not finding a solution in the Finsweet Attributes, then this beautiful slim solution came up. Thanks @memetican (again haha)!

1 Like