How to use tabs to let users sort a CMS collection list in Webflow
Want to let your user sort a Webflow collection list using buttons? You can do that easily by taking advantage Webflow's tab element. In this blog post I show you how to do this quickly via a short video tutorial. Enjoy!
Just recently I worked on a Webflow site for a real estate agent. Haven't heard of Webflow before? You can check it out and sign up for an account here (yes, that's an affiliate link). Here I implemented the functionality to let the site visitor sort a list of properties via buttons on the page. This effectively means the user is able to press a button and can sort properties by price or from newest to oldest (or whatever other criteria you specify). Let me show you how this is done:
Create your CMS collection and collection list on the page
If you're creating a site for a real estate agent or another client who needs to have commas in their pricing, see my recent blog post on this issue first
Insert the "Tab" element on your page and style the tabs to your liking
Add as many tabs as you need - one for each sorting option you need (e.g. one for filtering by price, one for filtering by date etc.)
Duplicate the collection list you have created earlier and filter one of the collection lists by price (use the sort order option), and the other one by date (or any other filter you want to apply)
Pull one of the collection lists into the first tab pane and the other one in the second tab pane
You can now press on each tab and reveal the corresponding collection list
Don't want to read? Watch the video tutorial below!