Create a free account to get access to additional free training videos. Enjoy this free video from CraftQuest! Create a free account to get access to additional free training videos. Join the Community
All element index pages in the Craft control panel now have a conditional filter built in to filter the elements based on field data.
There’s a new conditional builder in Craft 4, and it makes several cameo appearances.
The conditional builder makes its first appearance (at least in this course) on the element index page as the Element Index Filter. We use the conditional filter to create a list of elements per our requirements.
The faceted filtering of elements allows us to narrow down to just the elements we need to see (like entries). This is perfect for projects with a lot of content, like publishing sites for news.
The conditional builder is available via an icon on the right side of the element index search bar.
You can build up multiple filters, all AND additions, to narrow down to just the entries you’re looking for. And, then you can also add plain text search terms to get the exact results you need.
The filters scope to the sources on the left side of the element listing page.
A critical note on the new element index filter is that it does not persist across page loads. So if you navigate away from the index page or reload it, the filter you’ve built will go away.
However, the filters stick to the source under which you configured them. For example, if we created a set of filters under Podcast and Blog and toggled between them, the filters and filtered results will stick.
What's New in Craft CMS 4 is made up of the following videos: