Contao news

Read the official Contao announcements.

Contao 3.4.0-beta1 is available

by

Contao version 3.4.0-beta1 is available. Please do not use beta versions for productional websites! Download the release to check whether your website or custom extension needs adaptation.

Here are some of the highlight features in the new version. For a complete list, please read the changelog or check out the closed tickets of the release milestone (see the links at the end of the announcement).

SVG support

Thanks to Tristan Lins' initiative, Contao 3.4 supports SVG and SVGZ images. The images can not only be resized (thumbnails) but are also editable with the source editor in the file manager.

Responsive images

Martin Auswöger and Yanick Witschi have created the biggest pull request in the history of Contao to support new technologies like the <picture> element as well as the sizes and the srcset attribute. In combination with the picturefill.js script, you can implement responsive images, which are sent to the client in different sizes depending on the device and resolution.

An introduction to responsive images is available on responsiveimages.org.

As an additional highlight, the two have enhanced the automatic thumbnail generation so you can now mark any section of an image as "important part" in the file manager. Then, when cropped, the image will be focused on this part.

Style sheet order

The order of the internal and external style sheets is now configurable in the page layout, so the internal style sheets can be injected after the external ones if needed. In addition, there is now an option to export internal style sheets.

Additional form field classes

The container elements of all form fields in the front end have been supplemented with the CSS classes widget and widget-<type>, so it is easier to reference them via CSS.

<div class="widget widget-text mandatory">
  <label class="mandatory"></label>
  <input type="text" class="text mandatory">
</div>

<div class="widget widget-textarea">
  <label></label>
  <textarea class="textarea"></textarea>
</div>

Asynchronous JavaScript

Analogous to the |static flag, which allows to include JavaScripts and style sheets statically, an |async flag has been added in Contao 3.4, which allows to load JavaScript files asynchronously using the async attribute.

Image links in TinyMCE

It is now possible to switch between the page and file picker when needed, so you can not only link pages in TinyMCE but also files.

Active page in the navigation menu

The active page in the navigation menu is now always rendered as a link, if the URL contains query parameters (e.g. when reading a news article). If you e.g. open the page news/james-wilson-returns.html, it is now possible to click the link to the news.html page in the navigation menu.

Theme export with SQL files

It is possible in Contao 3.4 to store SQL files in the templates folder, which is associated with a theme. The SQL files will then be included in the export and the install tool will automatically find them after the theme import.

Timing attack prevention

In PHP 5.5, new functions to create and verify password hashes have been added to prevent timing attacks. We are using these functions in Contao 3.4, together with appropriate fallback routines for PHP 5.4 and 5.3.

Login to comment

If a visitor is not logged in and the "login to comment" option is enabled, the comment form will be hidden. Contao 3.4 will additionally display a "please log in to comment" message.

Skip images without meta data

There is now an option to skip images without meta data in an image gallery. This corresponds to the behavior of Contao 2.

Registration and password mails

The e-mail texts of the member registration and lost password modules now support simple tokens, which means that they can be personalized.

Insert tag link_name

The new insert tag [{]link_name[}] outputs the name of a page (in contrast to the [{]link_title[}] tag, which outputs the page title).

DCA flag "doNotTrim"

With the "doNotTrim" flag of the DCA, you can suppress the automatic removal of whitespace at the beginning and end of the user input.

Non-negative natural numbers

A new regular expression to validate non-negative natural numbers has been added, which can be used in the DCA as 'rgxp'=>'natural'.

New hooks and callbacks

The following hooks have been added in Contao 3.4:

  • compareThemeFiles
  • extractThemeFiles
  • exportTheme
  • sendNewsletter

The DCA now also triggers an "onundo_callback" when restoring a deleted record.

Also see: GitHub tickets | GitHub compare view | Contao changelog | Release overview

Back to news overview.

Comments

Add a comment

Please add 6 and 8.