Contao news

Read the official Contao announcements.

Contao 5.2 is available

by Marcus Lelle – Current issues

No sleep till Brooklyn: The new Contao version 5.2 is here!

The core team and many other developers have gone the extra mile to improve our favorite CMS. We are looking forward to the new features for users and developers.

Contao 5.2 replaces Contao 5.1, whose support ends with this release. The new version will be supported with updates until February 2024. Version 5.3 will then be the first LTS version of Contao 5.

You can find out which Contao versions are currently supported here.

For users

Advanced image processing

Many hours have gone into expanding the image processing. Contao already had a unique selling point among the content management systems and this has now been extended even further.

Contao now displays the image metadata in the back end preview. You can see which camera was used to take the picture, when it was taken and much more.

In stock photos, copyright information can often be found here as well. For this reason, there is another great feature in Contao 5.2: In the central definition of image sizes, you can now set how this metadata should be handled. Depending on your needs, you can retain appropriate copyright metadata when generating the images. #5837

Image quality in image size settings

You can now select your own image quality for the image sizes. This overwrites the setting from the config.yml. #6128

Vanilla JS accordion

A new template js_accordion.html5 allows the integration of an accordion without depending on jQuery or MooTools on the basis of Handorgel.js. You can now choose between the jQuery variant or the new variant.

If you want to switch, please note that the markup and CSS classes are different, so you will have to make adjustments here. #5875

Complete paths in the file management also for editors

Currently, with limited file access rights, you can only see the folders from the point at which you have received a share. In the new Contao version, you can always see the parent folders if you have a share in at least one subfolder. #6124

Shortcut "Edit image size"

From now on you have an edit icon directly next to each element where you can select an image size, with which you can go directly into the editing of the image size. #5610

screenshot of an image size form with the new icon that edits the image size credentials

Improving accessibility

Especially for screen readers, the labels of status icons are now changed according to their status. For example, different labels will be displayed for the publish icon depending on whether the item is published or not. #5419

News or event image as primary image

For news and event readers, the primaryImageOfPage is now added to the schema.org metadata of the page. This is read by Contao's own search module as well as by search engines. #5849

Standardization of the templates

Some templates had an additional DIV wrapper around the form fields, which made CSS styling difficult. These wrappers have now been removed.

The following three templates have been changed: member_default.html5, mod_changePassword.html5 and mod_password.html5. #5881

For developers

New insert tag system

The insert tag system has been completely revised. Not only does it now offer more security and more extension options, it also allows to overwrite core insert tags and to tag controllers as insert tags using #[AsInsertTag()]. #4779

In the course of this, the caching of the date insert tag was also significantly improved. #6194

Create modules and content elements in Twig templates

The new Twig functions frontend_module and content_element allow modules and content elements to be created directly in Twig templates without the need for a database entry. #5808

{% block content %}

{{ content_element('text', {
    headline: {
        unit: 'h1',
        value: 'Generated text element'
    },
    text: '<p>This is a paragraph of the text element.</p>'
}) }}

{{ frontend_module('navigation', {
    headline: {
        unit: 'h2',
        value: 'Generated navigation'
    },
    levelOffset: 1,
}) }}

{% endblock %}

Dark icon support for all icons

Contao 5.2 now creates the icon set for bright and dark mode not only for theme icons, but for all icons. We have agreed on the following naming convention:

icon.svg Light mode
icon--dark.svg Dark mode

In addition, we now use the suffix --disabled for disabled icons:

icon--disabled.svg Deactivated, light mode
icon--disabled--dark.svg Deactivated, dark mode

Much more

You can read about all the changes in detail in the changelog.

Compatibility

Contao 5.2 is compatible with Symfony 6, PHP 8.1+ and Doctrine 3.

See also: Tickets | Compare changes | Changelog

Show all news

Comments

Add a comment

What is the sum of 6 and 5?