Filter Collection lists
Learn how to filter and limit items in Collection lists.
Once you connect a Collection list to a Collection, it will display the first 100 items in that Collection. However, you can choose which items to display by using filters. You can display more than 100 items by enabling pagination. Filtering items is available in Collection list settings in the Element settings panel (D).
In this lesson
- Add filters to a list
- Delete filters
- Filter examples
- Show featured items only
- Hide current item
- Show related content
This lesson talks about creating filtered Collection list in the Designer. Real-time filtering/sorting on the live website (faceted navigation) is not yet available natively. Vote for this feature.
Add filters
Filters allow you to show specific Collection items in a Collection list that match whatever filter(s) you create. You can choose from a number of filter rules available for each Collection field type. To create a filter:
- Select the Collection list you want to filter
- Go to the Settings panel (D)
- Add a Filter under Collection list settings by clicking on the plus (+) sign
- Select the field you want to filter by in the first dropdown
- Choose a rule in the second field
- Specify a value if needed
- Click Save
You can add as many filters as you want. The filters will be combined by an AND operator.
Need to know
You won't be able to apply multiple fields for the same Collection field.
Delete filters
You can delete applied filters by clicking on the trash can icon next to the filter.
Show featured items only [Filter example]
Let’s say you want to only display featured blog posts on your homepage. To do that:
- Add, create, and style a “Blog Posts” Collection list
- Add a Filter in the Settings panel
- Select the “Featured” Switch field from the first dropdown
- Choose is on in the second dropdown
- Click Save
Learn more: Switch field
Hide current item [Filter example]
If you have a blog and you want each blog post page to feature a list of other blog posts, you can exclude the current blog post from the list using a filter. To exclude the current Collection item, the blog post in this case, do this:
- Add, create, and style a “Blog Posts” Collection list
- Add a Filter in the Settings panel
- Select the Collection name from the first dropdown
- Choose is not in the second dropdown
- The third field will show “current collection item”
- Click Save
Learn more: Collection pages
Show related content [Filter example]
Let’s say you want to display all the blog posts written by an author on the Author’s page. You can use a filter to only show those blog posts that reference this Author:
- Add, create, and style a “Blog Posts” Collection list
- Add a Filter
- Select the Reference field for your Authors from the first dropdown
- Choose Equals in the second dropdown
- Choose “current Author” in the third one
- Click Save
Now, each author page will show a list of the blog posts that reference this author. You can limit this list if you want to show only a specific number of related content.