Modern page layouts based on Twig
You could already use Twig templates in Contao 4.13. With the update to Contao 5.0, all content elements were converted to Twig. Contao 5.6 continues this path consistently and offers a new Twig page layout for the first time.
You can now use the new Twig layout with slots in parallel to the previous HTML5 page layout (fe_page). In any case, the old HTML5 page layout is still available for all Contao 5 Minor versions.
At first glance, it is noticeable that after activating the Twig page layout, almost all previous settings in the layout disappear. In future, the entire configuration will take place in the template. This is more flexible and therefore more future-proof and also allows among other things versioning of templates with VCS such as git and co. It is best to use the new Template Studio for this.
In the template layout/default itself, you use {% slot %} to define the individual sections to which articles or content elements can then be added. This means that you can only select the slots that the template actually provides. Stylesheets, JavaScript files and other assets can also be added directly via the Twig template and corresponding Twig functions.
Add content elements directly in the layout
You can now manage content elements directly in the theme and integrate them into the various layout areas or slots.
You can also enter an optional title for each content element. This is only used for clarity in the back end and is not displayed in the front end.
This feature does not sound spectacular at first glance, but it forms the technical and conceptual basis for the planned elimination of the previous front end modules. You can find out why front end modules are to be removed in Yanick's review of the developer meeting.
Job framework
A new framework has been created for the management and display of jobs. This allows you to better understand processes that happen in the background (such as rebuilding the search index) and to view errors or progress of these processes directly in the back end in the future.
The new architecture is flexible and independent of Symfony Messenger, so that different types of jobs are supported.
The new job display in the back end currently contains only a few entries, but this will change in the future. It is an important basis for a feature with great potential - not only for the core but also for all Contao extensions.
Passkeys in the front end
Contao 5.5 introduced passkeys for the back end. Now this function is also available in the front end.
In view of the replacement of the front end modules, the function has already been implemented as a pure content element. To use passkeys, there are the new content elements of the type "Login form" and "Manage passkeys".
Search indexer independent of the robots tag
In the page settings, you can now specify whether the search indexer should always or never index a page, regardless of the meta robots tag. Previously, you could already exclude a page from the Contao search, but release it for public search engines. Now the reverse is also possible!
Page type for calendar feeds
Similar to the page type for news feeds, there is now also a page type for calendar feeds. This means that you no longer have to configure the feed via the events archive, but can use your own page type. Existing feeds are migrated automatically.
Save form entries in session only if required
In Contao, form data was previously always stored in the session for a short time, for example to access the entered data using the {{form_session_data::*}} insert tag.
The problem: Even if this access was not required, the data was still stored in the session and a CSRF cookie was created, which deactivated the HTTP cache for a short time.
A new setting in the forms now ensures that data is only saved when it is really required. This means that in many cases you can completely dispense with a session and therefore the CSRF cookie in the front end.
The option is automatically activated for all existing forms to ensure backwards compatibility.
So if you do not use confirmation pages, deactivate this option for each form after the update for maximum performance.
Accessibility
Contao 5.6 also includes numerous optimizations in terms of accessibility.
Jump to content
To simplify keyboard navigation, there is now also a "Jump to content" link in the source code of the back end.
Help texts for form fields
You can now add a help text to the form fields, which is displayed below the respective field in the form.
Accessible navigation
Contao now offers a new standardized, accessible navigation template - including ARIA support, keyboard navigation, mobile version and status display.
To use the navigation, use the new template (mod_navigation_accessibility). And best of all: it comes with the necessary JavaScript and CSS base.
You can adapt the design individually to your needs using CSS. This new template therefore provides the ultimate complete solution for modern, accessible navigation!
User experience (UX)
To make working with Contao easier, various small and large improvements have also been integrated here.
Improvements to the context menu
The context menu was introduced in Contao 5.5. Thanks to a lot of feedback, the menu has been significantly improved. In particular, the clarity has been optimized through clearer label names and a visual separator.
In addition, the menu is now also available for global operations. This means that the most important functions are immediately visible, while the rest is only displayed after clicking on the three dots. The context menu alone makes it worth taking a look at the Contao 5.6 back end.
Copy to clipboard
If you use the "Copy to clipboard" function, you will now receive visual feedback. You can see this live in the preview links, for example.
Jump targets for "edit multiple"
You are already familiar with the jump bar when editing content. Now it has also been implemented for the "Edit multiple" function. This allows you to quickly and easily jump to a specific data record.
Example: You are editing the metadata of several pages and can jump directly to the position of the corresponding page by clicking on it.
Overwrite metadata
Sometimes it is helpful to remove metadata that has been set via the file manager. You can now use the new insert tag {{empty}} for this.
Many further improvements
Two-factor authentication: There is now an "Edit" button that can be used to display the setup information again. This allows users to add additional 2FA apps at any time without having to remove the existing protection.
ISO-3166-2: Contao now supports regional country codes such as AT-9 for Vienna, which allows for more precise geodata.
Select backup: Backups can now be selected directly and interactively in the backup:restore command.
New registrations: The confirmation period for new users has been extended from 24 hours to 14 days (336 hours) and is now flexibly configurable.
# config/config.yaml
contao:
registration:
# The number of days after which unconfirmed registrations expire.
expiration: 16
Developer features
Of course, there are new functions and improvements here too.
#[AsMessage]: The new attribute replaces the previous messenger priority interfaces and simplifies message handling.
Palette-Helper: The new class makes it easier to edit palettes and allows you to check whether certain fields exist, for example.
HtmlHeadBag shortcut: In the AbstractController, the method getHtmlHeadBag() is now available to access the head area more easily.
Contao date formats in Twig: Contao date formats can now be used directly and globally in Twig templates.
As always, you can find details in the changelog.
The tip of the iceberg
In addition to the features already mentioned, a lot was also done behind the scenes, which is not immediately visible, but nevertheless required a lot of time and dedication. The conversion to PHPUnit 11 alone kept several developers busy for almost the entire developer meeting.
Only through this additional effort can the code base and the future of Contao be secured.
In addition to the implementation of the new features, I would also like to point out the great manual, which has already documented many of the new functions.
Therefore the request: Join in and support Contao - be it through social media posts, blog posts or financial support.
The new LTS version is coming soon!
After the release is before the release. Contao 5.6 is the last version before the next LTS version Contao 5.7. It is therefore worth checking and testing Contao 5.6 in detail in order to optimally prepare for Contao 5.7 or to submit one or two improvement requests on GitHub.
The official release article on contao.org is also worth reading and the Contao Academy YouTube video is well worth watching.
trakked is compatible with Contao 5.6
As usual, trakked provides you with all known features for Contao 5.6. You can update from Contao 5.5 to 5.6 as usual via the Contao Manager.
Changelog of the fixed issues in Contao 5.6.0:
- #8697 Rename the layout template ( aschempp )
-
#8696
Enable the
appendGroupInSearchoption for Choices ( zoglo ) - #8695 Remove the debug markup from the Combiner ( ausi )
- #8684 Show the context menu even if all operations are primary ( zoglo )
-
#8678
Adjust the
Cache-Controlfor Turbo requests in the back end ( zoglo ) - #8682 Fix the title tag in Twig layouts ( fritzmg )
- #8666 Add the page class to the body element ( aschempp )
- #8636 Fix the record fallback label ( aschempp )
-
#8664
Fix an undefined array key warning in the
AbstractLayoutPageController( zoglo ) - #8663 Do not make the new Twig layouts the default ( leofeyer )
Changelog of the fixed issues in Contao 5.6.0-RC3:
-
#8513
Use
data-turbo-track="dynamic"instead of reloading ( fritzmg ) -
#8634
Move the
tl_buttonsID to the top element ( aschempp ) - #8625 Use the operations builder for the versions view ( aschempp )
- #8620 Fix the new buttons and allow to override the configuration ( aschempp )
- #8653 Make the navigation burger color adjustable ( zoglo )
- #8623 Do not add a CSS class to the operation attributes ( aschempp )
- #8626 Fall back to the label if an operation has no title ( aschempp )
-
#8643
Use
nodeinstead ofelementin the passkey mutation observer ( zoglo ) - #8645 Output the global data for additional head/body content in layout pages ( m-vo )
- #8578 Open the browser context menu on the second right-click again ( fritzmg )
- #8621 Fix the drag handle of the image size items ( aschempp )
- #8619 Always hide the parent node of invisible drag handles ( aschempp )
- #8624 Optimize the theme import/export operations ( aschempp )
-
#8617
Do not add a leading white space in the
deeplink-controllermigration ( zoglo ) -
#8614
Remove
aria-hiddenon drag handles ( aschempp ) -
#8612
Remove a superfluous
"in thedata-actionattribute of thebe_maintemplate ( lukasbableck ) - #8570 Use a security voter to check the form field type access ( aschempp )
Changelog of the fixed issues in Contao 5.6.0-RC2:
-
#8586
Remove the close button from non-gallery
fileTreewidgets ( fritzmg ) - #8583 Use the page finder in the fragment insert tag ( leofeyer )
- #8594 Add the event dates to the calendar feed titles again ( fritzmg )
-
#8590
Deprecate
Contao\FeedandContao\FeedItem( fritzmg ) -
#8593
Switch to
php-feed-io/feed-io( fritzmg ) - #8566 Highlight the selected row in the single source picker ( de-es )
-
#8575
Show the drag handle in
MODE_PARENTagain ( fritzmg ) - #8560 Properly reassign the active item in the accessible navigation ( zoglo )
- #8576 Simplify the theme operations ( aschempp )
- #8574 Fix a JS error in the operations menu controller after Turbo navigation ( aschempp )
- #8573 Fix the separator spacing in the global context menu ( aschempp )
-
#8556
Fix the infinite loop on
encore dev --watch( zoglo )
Changelog of the new features in Contao 5.6.0-RC1:
-
#8094
Use a close icon instead of
×or×( m-vo ) - #8434 Add "create new" buttons to the tree view ( aschempp )
- #8519 Use security voters in the comments bundle ( aschempp )
-
#8242
Deprecate
Backend.enableImageSizeWidgets()( fritzmg ) - #8011 Implement passkey support for the front end ( fritzmg )
- #8511 Make the registration expiration time configurable ( zoglo )
- #8012 Provide a template for an accessible navigation ( zoglo )
- #8533 Refactor the "switch user" operations ( aschempp )
- #8390 Add a calendar feed page controller ( fritzmg )
- #8483 Always add a close button to messages ( aschempp )
- #8523 Use a voter instead of a button callback for the alias element ( aschempp )
- #8372 Simplify the operations menu labels ( aschempp )
- #8066 Add the foundation for jobs ( Toflar )
-
#8529
Add a
hide()method to theDataContainerOperationclass ( Toflar ) -
#8522
Make the table dynamic in the
DisableAppConfiguredSettingsListener( Tastaturberuf ) - #8437 Use POST requests for non-safe operations ( aschempp )
- #8480 Use the jump target navigation in the "edit multiple" view ( zoglo )
- #8204 Improve the "copy to clipboard" functionality ( m-vo )
- #8346 Refactor the global operations ( aschempp )
-
#8479
Enable
postcss-preset-envfor theflexibletheme ( zoglo ) -
#8495
Add a general
Fromoverride for theContaoMailer( fritzmg ) - #8418 Deprecate legacy content elements with fragment replacements ( fritzmg )
- #8252 Add the "search indexer" page setting ( CMSworker )
- #8462 Support ISO 3166-2 country subdivision codes ( ausi )
- #8456 Implement rate limiting on the search indexer ( Toflar )
-
#8510
Update the
flexibletheme - reorder themain.pcssimports ( zoglo ) -
#8509
Update the
flexibletheme - move the responsive styles ( zoglo ) -
#8508
Update the
flexibletheme - move the highlight colors ( zoglo ) -
#8507
Update the
flexibletheme - cleanup the variables ( zoglo ) -
#8506
Update the
flexibletheme - clean up utilities and miscellaneous styles ( zoglo ) - #8472 Add the Contao date formats to the Twig global ( fritzmg )
-
#8476
Add
HtmlAttributestobe_mainand meta tags to theHtmlHeadBag( fritzmg ) - #8473 Compress the serialized search document ( Toflar )
-
#8469
Restructure the
flexibletheme and rewrite it using PostCSS ( zoglo ) - #8446 Rewrite the wizards to use Twig templates ( aschempp )
-
#8465
Allow selecting the backup within the
backup:restorecommand ( zoglo ) - #8400 Use SortableJS and move the drag handle to the left side of elements ( aschempp )
- #8411 Add a separator to the DCA operations menu ( aschempp )
- #8424 Make the subscribed services optional in the abstract controllers ( leofeyer )
- #8404 Add the current member groups to the schema.org output ( Toflar )
- #8410 Use listeners to set the dynamic parent table and the default labels ( aschempp )
-
#8393
Add a shortcut to get the
HtmlHeadBag( aschempp ) - #8245 Implement a "store in session" setting for forms ( fritzmg )
- #7825 Add a help text to form fields in the form generator ( de-es )
- #8285 Extract the building of palletes and boxes into the data container ( aschempp )
- #8395 Allow search indexers to index protected content ( Toflar )
- #8370 Add a helper for the searchable content on the search document ( Toflar )
- #8302 Add a palette helper to support working with the palette manipulator ( Toflar )
- #8366 Update to SEAL 0.9 ( Toflar )
-
#8331
Deprecate the messenger priority interfaces in favor of the new
#[AsMessage]attribute ( Toflar ) - #8257 Rewrite the SERP widget to a Stimulus controller ( m-vo )
- #8224 Do not require CSRF token checks on preflight requests ( Toflar )
-
#8212
Deprecate the
Contao\Messagesclass ( fritzmg ) - #8207 Rewrite the back end search to use Turbo streams ( m-vo )
-
#8226
Make
Backend.modalSelector()work from within a modal dialog ( m-vo ) - #6955 Support reloading DCAs ( ausi )
-
#8191
Deprecate the usage of the
typePrefixproperty on models ( fritzmg ) - #8064 Extract messages and the dialog element from the Template Studio ( m-vo )
- #8072 Refactor the Turbo stream handling into a separate module ( m-vo )
-
#8184
Add the
Countableinterface to theFilesystemItemIterator( m-vo ) - #8052 Add a directory filter VFS decorator ( m-vo )
-
#8054
Add a
count()helper method to theFilesystemItemIterator( m-vo ) - #8000 Add a "skip to content" link in the back end ( leofeyer )
- #8010 Upgrade to PHPUnit 11 ( Toflar )
- #8006 Add modern page layouts ( m-vo )
- #8007 Add an "edit" action to the 2FA view ( bytehead )
-
#8002
Allow overwriting metadata via the
[{]empty[}]insert tag ( ausi ) - #7999 Add support for content elements in page layouts ( Toflar )
- #7998 Enable format conversion for more image formats ( ausi )
Changelog of the fixed issues in Contao 5.6.0-RC1:
- #8550 Adjust the text indentation of the menu buttons ( m-vo )
- #8549 Correctly hide disabled operations ( leofeyer )
-
#6859
Unlock
doctrine/dbal4.x anddoctrine/orm3.x ( fritzmg ) -
#8544
Only apply the button width in the
operations-menu( zoglo ) - #8542 Fix the clickable area of the operation buttons ( aschempp )
- #8537 Fix the operation menu position in the "paste into" view ( zoglo )
- #8530 Distinguish between "copy" and "duplicate" ( leofeyer )
- #8538 Use the default translations for the "new" button ( aschempp )
-
#8531
Consider the previous
as-gridview forDataContainer::MODE_PARENT( zoglo ) - #8518 Simplify the positioning of the operations menu ( zoglo )
-
#8528
Handle empty
Content-Typeheader in CORS ( aschempp ) -
#8517
Use
Backend::addToUrl()when switching to "edit multiple" mode ( aschempp ) -
#8490
Switch the DCA request on
kernel.requestandkernel.finish_request( ausi ) - #8482 Fix the width of the select wizard ( zoglo )
- #8478 Fix the DCA loading performance in dev mode ( ausi )
-
#8467
Fix the
widthwithin theallowedAttributeswidget ( zoglo ) - #8468 Fix a merge error in the guests migration ( aschempp )
-
#8459
Consider the
<hr>element as amenuLinkSelector( zoglo ) -
#8412
Do not use
MooTools.getElements()in thetoggle-nodes-controller( zoglo ) -
#8398
Correctly close the
header_outletsblock ( Toflar ) - #8296 Add the lost commit of #8207 again ( m-vo )
- #8216 Copy the session in the DCA request switcher ( ausi )
- #8178 Fix the module wizard and section wizard scripts ( m-vo )
- #8071 Fix the "overwrite metadata fields" migration ( ausi )
About Contao 5.6
The first stable version of Contao 5.6 has been released on 18 August 2025 and has been the successor of Contao 5.5. 5.6 will be updated until 14 February 2026, after which it will be replaced by Contao 5.7.
Add a comment