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.

Pull Requests: #8006

Content elements in the page layout

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.

Pull Requests: #7999

Passkeys in the frontend

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.

Pull Request: #8011

Context menus

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.

Pull Requests: #8411, #8400, #8346, #8437, #8372, #8434

Improvements to the search indexer

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.

Pull Requests: #8252

The new job framework

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.).

Pull Requests: #8066

Accessible navigation

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.

Pull Requests: #8012

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.

Pull Request: #8000

Help texts in forms

Form fields can now be supplemented with help text, which is displayed below the field by default.

Pull Request: #7825

Page type for calendar feeds

If you want to offer an XML feed for calendars on your website, you now have a dedicated page type available for this purpose.

Pull Request: #8390

Store data in the session

Contao no longer automatically saves all form entries in the session. This speeds up processing and means that no cookies are generated.

If you want to continue outputting the data via insert tag after submission, you can do so by selecting the Store data in the session.

Your old forms will automatically have this checkbox selected when you update, so that everything continues to work as before.

Pull Request: #8245

Two-factor authentication editable

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.

Pull Request: #8007

Better file metadata merging

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.

Pull Request: #8002

Anchor points for ‘Edit multiple’

If you select multiple elements for editing, you now have a jump mark above each field in the list.

Pull Request: #8480

Select backup to restore

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.

Pull Request: #8465

Visual feedback when copying preview links

The ‘Copy to clipboard’ function now provides visual feedback as soon as the copying process has been successful.

Pull Request: #8204

Additional features

ISO-3166-2

Contao now also supports ISO 3166-2 country codes such as AT-9 for Vienna.

Pull Request: #8462

Include protected elements in your search index

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.

Pull Request: #8395

Member registration period extended

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.

Pull Request: #8511

Developer features

#[AsMessage]

The new #[AsMessage] attribute replaces the previous Messenger Priority interfaces.

Pull Request: #8331

Palette helper

The new palette class simplifies the manipulation of palettes and, in particular, also makes it possible to query whether fields already exist.

Pull Request: #8302

HtmlHeadBag-Shortcut

The AbstractController now has a method called getHtmlHeadBag().

Pull Request: #8393

Contao date formats in Twig

The Contao date formats are now available globally in Twig, e.g. as contao.date_format.

Pull Request: #8472

Hard work that no one sees

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.

  • Upgrade to PHPUnit 11, Pull Request: #8010
  • Add the Countable interface to the FilesystemItemIterator, Pull Request: #8184
  • Add a directory filter VFS decorator, Pull Request: #8052
  • Add a count() helper  method to the FilesystemItemIterator, Pull Request: #8054
  • Refactor the Turbo stream handling into a separate module, Pull Request: #8072
  • Extract messages and the dialog element from the Template Studio, Pull Request: #8064
  • Support reloading DCAs, Pull Request: #6955
  • 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 &times;, 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.

Compatibility

Contao 5.5 is compatible with

  • Symfony 6.4 and 7
  • PHP 8.2+
  • Monolog 3
  • Doctrine DBAL 3 and 4
  • Doctrine ORM 2 and 3
  • TinyMCE 5, 6 and 7

Siehe auch: Tickets | Compare changes | Changelog

Marcus Lelle

About Marcus Lelle

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

What is the sum of 2 and 6?