Learn how to filter and limit items in Collection lists.
When you connect a Collection list to a Collection, it displays the first 100 items in that Collection by default. You can choose which items to display using filters. You can also display more than 100 items with pagination.
How to add filters
Filters let you display specific Collection items in a Collection list that match the filter criteria you specify. 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 Element settings panel > Collection list settings > Filter
- Click the “plus” icon
- Choose the Collection field you’d like to filter by from the Field dropdown
- Choose the rule you want to apply from the When dropdown
- (Optional) Enter a value for the rule you selected, if needed
- Click Save
You can combine and add as many filters as you want. To delete filters, click the “trash” icon.
How to use filters to show featured items
Let’s say you have a Collection list of blog posts on your homepage, and you want it to only display featured posts. First, you’ll need to add a Switch field to your Collection settings, which you can toggle on for the blog posts you want to feature on your homepage. Then:
- Select the Collection list you want to filter on the canvas
- Go to Element settings panel > Collection list settings > Filter
- Click the “plus” icon
- Choose the featured Switch field from the Field dropdown
- Choose is on from the When dropdown
- Click Save
To add or remove blog posts from your Collection list, you can toggle the featured Switch field on or off.
How to use filters to hide the current item
If you’re building a blog site and want each blog post page to feature a list of other blog posts, you can use a filter to exclude the current blog post from the list:
- Select the Collection list you want to filter on the canvas
- Go to Element settings panel > Collection list settings > Filter
- Click the “plus” icon
- Choose the Collection name from the Field dropdown (e.g., “Blog posts”)
- Choose is not from the When dropdown
- Confirm the third field that appears says Current Collection item
- Click Save
How to use filters to show related content
If you’re building a blog site, you may also want to create an author’s page that shows all blog posts written by a particular author in another Collection of authors. To do this, you’ll first need to add a Reference field to your blog post Collection settings and connect that field to your Collection of authors. Then, for each blog post item in your blog posts Collection, set the value of the Reference field to the associated author in the authors Collection.
Once you’ve set up the relationship between authors and blog posts with the Reference field, you can apply a filter to a Collection list to show only blog posts that reference the associated author:
- Select the Collection list you want to filter on the canvas
- Go to Element settings panel > Collection list settings > Filter
- Click the “plus” icon
- Choose the Reference field from the Field dropdown
- Choose Equals from the When dropdown
- Choose Current author from the third dropdown that appears
- Click Save
You can also limit the Collection list if you want to show a specific number of related blog posts.