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

Custom Sources in Craft CMS

Custom Sources in Craft 4 let us create a source label and choose what elements should show up for that source, including filtering based on some limited set of conditions.

Every ele­ment list­ing view in the Craft CMS con­trol pan­el has a side­bar with sources of ele­ments. Start­ing in Craft 3, we could cus­tomize that side­bar by adding head­ers and re-arrang­ing the ele­ment sources.

How­ev­er, until Craft 4, those sources were only actu­al ele­ments in Craft: a chan­nel sec­tion, a Sin­gle, a Struc­ture, etc. And, you got every­thing in that sec­tion by default. So, fil­ter­ing, search, and sort­ing need­ed to be done man­u­al­ly every time. 

So, this led to some less than opti­mal author­ing expe­ri­ence sit­u­a­tions, espe­cial­ly with sites with a lot of con­tent and com­plex author­ing needs. There are even some plu­g­ins in the Craft Plu­g­in Store that address this short­com­ing of Craft. 

With Craft 4, we have Cus­tom Sources.

Cus­tom Sources let us cre­ate our source label choose what kind of ele­ments should show up for that source, includ­ing fil­ter­ing based on some lim­it­ed set of conditions.

We fil­ter via a new uni­fied fil­ter­ing inter­face that we now see in sev­er­al places across the Craft con­trol panel. 

Pre­vi­ous­ly, we set up some fil­ters to show only Blog link entries and Blog arti­cle entries. The fil­ters worked until we left the page. Cus­tom sources to the rescue!

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