Pro-Tip: The menu can also be openend and closed with the m key.
by Marcus Lelle
Contao 5.6.0 is available
Contao 5.6 makes our most popular website tool even more modern and user-friendly. The release brings numerous improvements to the backend, paves the way for future-proof page layouts and expands the possibilities in the frontend. In addition, a lot of work has gone into things that you may not see at first glance. More on that later.
The core team and many other developers have once again processed over 200 pull requests.
Contao 5.6 will receive updates until February 2026 and will then lead directly into the next LTS version, Contao 5.7. Version 5.3 will also continue to receive updates as an LTS version.
You can find out which Contao versions are currently supported in the Contao release plan.
Modern page layouts with Twig slots
Contao 5.6 introduces modern page layouts based on Twig templates with slots. These enable flexible, modular design of the output. The previous HTML5 page layouts will remain available throughout the Contao 5.x branch, so you can plan your transition at your leisure.
In future, you will have much more freedom in designing your page layout and, as usual with Twig, you will be able to create variants more easily. In addition, the templates can be versioned via git and quickly transferred from one project to another.
To achieve this, many settings from the backend are now moved directly to the template. This happens as soon as you select ‘Twig layout with slots’ as the layout type. We will take a detailed look at how to transfer the settings to the new Twig template in a separate article.
The new standard template for pages is now called layout/default, and the layout areas are filled with slots and placed in the desired location.
Yanick already announced it in his article about the developer meeting in February: In the long term, new content elements will replace the old modules. The first step is that you can now use content elements in the page layout.
The theme now has a separate area with its own icon for this purpose. Here you can create as many content elements as you like. You can now give each content element a title. Currently, this is only used in the page layout so that you can see which content element you are selecting. There are already ideas for other uses for the title.
For example, in the future, you will be able to use an image content element for a logo and assign it directly to a layout area.
Passkeys were introduced for the backend in Contao 5.5, and now you can also use them in the frontend.
This is where the content elements in the page layout mentioned above come into play. The new content elements Login Form and Manage Passkeys provide you and your website visitors with the option of using passkeys to log in to protected areas.
The context menus in the backend are now clearer: clear labels and a visual separator make it easier to find your way around. It now also works for global operations.
You can now decide how the internal search indexer should handle each page, regardless of the robots tag. If you do not select anything, the behaviour will continue to be based on the robots tag. However, you can now also specify that you always want the page to be indexed locally or never indexed.
Sometimes it's great to watch others at work. Now there is a dedicated icon in the status bar that takes you to an overview of all active and currently processed jobs.
This fantastic new feature is just the beginning of a range of possibilities for background tasks that you have triggered manually or automatically and whose status you can track live. You also always receive visual feedback when something has been completed.
The framework can also be used by extensions, creating opportunities to keep a clear overview of background tasks in projects. We are already excited to see how various extensions will use this in the future (ZIP downloads, PDF generation, large exports or imports, etc.).
Contao 5.6 now provides you with accessible navigation out of the box, which automatically converts to a burger menu on mobile devices. All you need to do is select the mod_navigation_accessible.html5 template in the navigation module.
The styling of the menu can be easily customised using custom properties.
A little tip: If you are still using Contao 5.3 in some of your installations, you can use Sebastian's extension, which provides you with a number of accessibility features as a backport.
Additional accessibility features
Skip to content
If you use the keyboard to operate the Contao backend, you now have a jump mark to the content right at the start.
You can now use the Edit button to display the setup information again in order to set up additional 2FA apps – without having to reset the existing configuration.
You probably maintain most of your files' metadata directly in the file management system. However, sometimes you may want to deviate from the file's metadata at a specific point in the content element of an image.
Previously, if you left the image title blank when overwriting the metadata, the one from the file management system was automatically used. With the new insert tag {{empty}} you can deliberately omit the output of text in any field.
If you want to restore a backup via the console, enter contao:backup:restore to display a list from which you can conveniently select the desired backup.
Protected content is now additionally marked with <!-- indexer::protected -->. When calling Document::getSearchableContent(), an optional parameter can now be passed to include such protected elements in your index as well.
The time a new member has to confirm their registration in the frontend has been increased from 24 hours to 14 days. If necessary, the period can also be adjusted in the configuration via contao.registration.expiration.
You probably know this from projects involving upgrades or changing the CSS framework: a lot of work has to go into a project from time to time without anyone outside the project seeing any of it.
This time, too, a lot of work has gone into the update that is not directly visible in the features. The switch to PHPUnit 11 alone kept several developers busy for almost the entire developer meeting.
Rewrite the back end search to use Turbo streams, Pull Request: #8207
Rewrite the SERP widget to a Stimulus controller, Pull Request: #8257
Extract the building of palletes and boxes into the data container, Pull Request: #8285
Rewrite the wizards to use Twig templates, Pull Request: #8446
Restructure the `flexible` theme and rewrite it using PostCSS, Pull Request: #8469
Use a voter instead of a buCon callback for the alias element, Pull Request: #8523
Refactor the switch user operations, Pull Request: #8533
Use security voters in the comments bundle, Pull Request: #8519
Use a close icon instead of × or ×, Pull Request: #8094
Changelog and video
You can read about all the changes in detail in the changelog. Christian Feneberg has also created another interesting video (in German language) about Contao 5.6.
Marcus has taken on the project coordination of Contao, trying to untie the Gordian knot. Since 2003 he is self-employed as BIADES and since 2005 he is project manager and numbers person at ANTWORT:INTERNET in Berlin. Through his spare time he is accompanied by Jupe, Pete and Bob as well as his family.
Add a comment