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

What's New in Craft CMS 4

Element Index Filtering in Craft CMS

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 con­di­tion­al builder in Craft 4, and it makes sev­er­al cameo appearances. 

  • Ele­ment index filter,
  • Cus­tom sources, and
  • Con­di­tion­al fields

The con­di­tion­al builder makes its first appear­ance (at least in this course) on the ele­ment index page as the Ele­ment Index Fil­ter. We use the con­di­tion­al fil­ter to cre­ate a list of ele­ments per our requirements.

The faceted fil­ter­ing of ele­ments allows us to nar­row down to just the ele­ments we need to see (like entries). This is per­fect for projects with a lot of con­tent, like pub­lish­ing sites for news.

The con­di­tion­al builder is avail­able via an icon on the right side of the ele­ment index search bar. 

You can build up mul­ti­ple fil­ters, all AND addi­tions, to nar­row down to just the entries you’re look­ing for. And, then you can also add plain text search terms to get the exact results you need.

The fil­ters scope to the sources on the left side of the ele­ment list­ing page. 

A crit­i­cal note on the new ele­ment index fil­ter is that it does not per­sist across page loads. So if you nav­i­gate away from the index page or reload it, the fil­ter you’ve built will go away. 

How­ev­er, the fil­ters stick to the source under which you con­fig­ured them. For exam­ple, if we cre­at­ed a set of fil­ters under Pod­cast and Blog and tog­gled between them, the fil­ters and fil­tered results will stick.

What's New in Craft CMS 4 is made up of the following videos: