Skip to main content

New in Craft CMS 5.8

Craft 5.8 was released on July 1. The headline feature is a new field type called Content Block, and the additions I'm most excited about are the ones that make everyday content editing less frustrating.

Thomas Sausen

Content block fields

Content Block is a new field type that groups multiple fields into a single, reusable block. If you've ever co-opted a single-row Matrix field just to visually group a handful of fields (a hero with a headline, subline, and image), this is what you actually wanted. You define the field layout once and use it across different entry types. In templates, you access it like any other field, with the content block as the container and its fields nested inside. Grouped SEO fields look like an obvious use case too: title, description, and og:image in one place instead of scattered across the layout.

Generated fields

Generated Fields let you define additional values for your elements using Twig templates, saved alongside the element data and accessible in templates and via GraphQL. They're set up in the field layout rather than added as fields. I haven't used them yet.

Collapsible source headings

Source headings in element indexes are now collapsible. That sounds like nothing until you have a site with many sections. Here on CraftEntries, the Entries sidebar has a Links heading with Links, Official Links, Community Links, and Topics underneath it. Most days I'm not doing anything with links, and now I can fold the whole thing away and stop looking at it.

The change also shows that Pixel & Tonic sees the problem: everything living under Entries gets long. It isn't the full answer yet, but it's the right place to look.

Grouped entry types for Matrix fields

This one matters a lot for anyone building content builders. Before 5.8, all entry types in a Matrix field appeared in one flat list. On a typical setup with a dozen or more entry types, that list gets unwieldy fast.

In 5.8, you can organize them into named groups. For example, "General" could contain Heading, Text, and Quote, and "Media" could contain Gallery and Image. Editors no longer have to scroll through everything to find what they need.

On top of that, Matrix fields with more than five entry types now automatically show a search input in the creation menu.

Expand and collapse all Matrix blocks

Matrix fields set to the inline-editable blocks view mode now have "Expand all blocks" and "Collapse all blocks" actions. It sounds minor, but the absence of this has been a persistent annoyance. Until now, collapsing all blocks required a keyboard shortcut that was neither obvious nor discoverable. Direct competitors like Statamic solved this with a simple UI button years ago.

Search input for relational fields

Relational fields set to a single element source now show a search input by default, so you can filter within the field instead of opening the selector modal. There's a new "Show the search input" setting if you'd rather turn it off.

Notification and slideout position

Users can now set their preferred notification and slideout positions in their account preferences. It's per-user, so it doesn't affect anyone else on the project.

Conclusion

Content Block and Generated Fields will take a while to show up in my own projects, but I'll notice the grouped Matrix entry types and the expand/collapse actions from day one. 

Check the full changelog for everything not covered here.
 

Thomas Sausen

Thomas Sausen

Web Developer

Thomas started building WordPress websites in 2005, worked with ExpressionEngine, and fell for Craft CMS in 2013. He freelances from Germany and founded CraftEntries in 2015, where he also hosts the podcast.
  • New in Craft CMS 5.12

    Thomas Sausen

    Craft 5.12 came out this week. Most of the attention will go to the new MCP servers, but for a bilingual site like this one, the Sites pane is the more useful addition.
  • New in Craft CMS 5.10

    Thomas Sausen

    Craft 5.10 came out yesterday. The headline is a deletion workflow that stops you before you break something, and it turns out Craft has had a version of this for years, just for users.
  • New in Craft CMS 5.9

    Thomas Sausen

    Craft 5.9 came out yesterday. Two or three of the additions will change how I set up the control panel on new projects.