Contao news

Read the official Contao announcements.

Changes in the upcoming version 2.8

by Leo Feyer – Current issues

This article describes the changes and improvements of the upcoming TYPOlight version 2.8. It is meant as an information for administrators and developers and not as an introduction of the new version. A news article and a video introducing the new features will be published together with the first release candidate.

Handling MooTools scripts

The biggest change in version 2.8 will be the handling of MooTools scripts.

MooTools templates in version 2.8

As you see, you can now choose multiple MooTools templates that initialize different MooTools applications like the accordion, the slimbox or the mediabox (new in version 2.8). In addition, you can enter custom JavaScript code that will be added at the bottom of the page. Of course, you can also use the new interface for your custom extensions:

$GLOBALS['TL_MOOTOOLS'][] = '<script type="text/javascript" src="script.js"></script>';

In contrast to the additional head tags, MooTools scripts will be added at the bottom of the page.

Defining the media type of a style sheet

In version 2.8, you can define the media type of a dynamically added style sheet:

$GLOBALS['TL_CSS'][] = 'path/to/style.css|screen,handheld';

Improved form field labels

Mandatory fields will still be marked with a star, however it will be nested inside the label tag, so tableless layouts will not break.

<label for="text">Text <span class="mandatory">*</span></label>

Database query cache

To improve the overall performance of TYPOlight, a database query cache has been added to avoid sending the same SELECT query multiple times (unless of course the result set is being modified). If you explicitely want to bypass the database cache, you can use the new method executeUncached().

$result = $this->Database->executeUncached("SELECT * FROM …");

ModuleRegistration and ModulePersonalData callbacks

Both front end modules now trigger the onload_callback and save_callback defined in the Data Container Array (tl_member). If you have defined custom callbacks, make sure to check the origin of the request:

function onload_callback()
{
if (TL_MODE == 'FE') {
// Front end code
} else {
// Back end code
}
}

New front end hooks

The following hooks have been added in version 2.8:

Name Description
generatePage is triggered before the main layout template is compiled
printArticleAsPdf is triggered when an article is exported as PDF
addLogEntry is triggered when a log entry is added
loadLanguageFile is triggered when a language file is loaded
activateRecipient is triggered when a newsletter recipient is added (subscribe)
removeRecipient is triggered when a newsletter recipient is removed (unsubscribe)

Template changes

The event reader template is now called event_full instead of event_default. The image gallery content element now uses a switchable template file (partial) called gallery_default. The main page template fe_page has been modified (see revision 59).

Modified templates

The following front end templates have been modified (see revision 59). In case you have customized one or more of them, make sure to apply the changes to your own versions.

  • event_teaser.tpl
  • mod_eventlist.tpl
  • ce_accordion.tpl
  • ce_download.tpl
  • ce_downloads.tpl
  • ce_gallery.tpl
  • ce_hyperlink.tpl
  • ce_hyperlink_image.tpl
  • ce_image.tpl
  • ce_teaser.tpl
  • ce_text.tpl
  • fe_page.tpl
  • form_captcha.tpl
  • form_password.tpl
  • form_widget.tpl
  • member_default.tpl
  • member_grouped.tpl
  • mod_article_teaser.tpl
  • mod_flash.tpl
  • mod_logout_1cl.tpl
  • mod_logout_2cl.tpl
  • mod_quicknav.tpl
  • mod_random_image.tpl
  • mod_search_advanced.tpl
  • nav_default.tpl
  • mod_newsreader.tpl
  • news_full.tpl
  • news_latest.tpl
  • mod_newsletter_reader.tpl
  • nl_default.tpl
  • mod_password.tpl

Deprecated templates

The following front end templates are not used anymore and have been removed (see revision 58):

  • ce_accordion_image.tpl
  • ce_accordion_image_fullsize.tpl
  • ce_accordion_image_link.tpl
  • ce_gallery_fullsize.tpl
  • ce_image_fullsize.tpl
  • ce_image_link.tpl
  • ce_text_image.tpl
  • ce_text_image_fullsize.tpl
  • ce_text_image_link.tpl
  • event_default.tpl
  • mod_flash_content.tpl
  • moo_close_all.tpl
  • moo_default.tpl
  • moo_modify_foreground.tpl

Module relocation

The following core modules will be moved to the Extension Repository:

  • dfGallery
  • flash_content
  • glossary
  • memberlist

See the ticket system for the complete changelog. The first release candidate of TYPOlight 2.8 will be published in November 2009, the final release is expected to be published in the first quarter of 2010.

Show all news

Comments

Comment by Mark Hurd |

Very excited to see the various mootools and extensions like dfGallery made optional. I recently ended up removing these manually so as not to confuse back-end users.

By adding custom JS to the bottom of the page, and the small tweak to the form generator labels, TL has managed to get even closer to my actual workflow. I swear the team is developing this just for me. :)

Comment by Twisterson |

Why there is no choice or full migration to jQuery?

Comment by Michiel |

It's either MooTools or JQuery, both have theire pro's and cons. Since the choice in TL has been MooTools for a while now, personally I don't see why a change to jQuery would be nessecary. Most things can be done with either framework, but just in a slightly different way. If you ask me, the most important thing is to stick with the choice (regardless of what it is), and not change it around too much. A change to jQuery would probably require a rewrite of most core TL js-scripts, without any particular advantage....

Comment by Matz Särås |

I'm really exited! Nice dev. work (need I add "as usual"?)!

Comment by Ross Garcia |

I like the changes they did to the non-admin users for the news module, and the new features added on version 8.

Add a comment

What is the sum of 4 and 3?