Skip to content

2.3.0

Choose a tag to compare

@zoglo zoglo released this 15 Sep 08:46
· 20 commits to main since this release
b3ed990

Cookiebar templates in Twig / Strict types / moderinzed JS

Requirements

  • Minimum PHP version: 8.3

New Features

  • Same as other consent tools such as ccm19.de, the cookiebar now has an X to temporarily close it without giving consent
    • The status is saved in the session storage, meaning that it will reappear on the next visit

Templates

  • Fully rewritten in Twig
  • simple template is now a variant of the default template
  • Why Twig? → easier and more flexible
    • Example of customizing the block iFrame (yes, you could also just use a variant)
    {# templates/ccb/element_blocker.html.twig #}
    {% extends "@Contao/ccb/element_blocker.html.twig" %}
    {% block styles %}
       {{ parent() }}
       <style>html{background:#f47c00;}</style>
    {% endblock %}
    

JavaScript

  • Cookiebar JS has been rewritten as a class, with JSDoc for type-safe contributions
  • Internet Explorer support has been removed

PHP

  • declare(strict_types=1); everywhere
  • Services are no longer autowired
  • JS & CSS assets are now loaded via the asset component

Deprecations

  • The addModule method has been deprecated, there is no replacement yet but it could be rewritten to something similar that klaro has. If you are interested in funding it, please contact info@oveleon.de

Important

Disclaimer
Templates do not have a BC-Promise and are thus not backward-compatible.
Any customizations you've made must be adapted to Twig. Please understand that we cannot provide general support regarding Twig templates.
Issues related to helping modify your Twig templates will be closed without notice.

For professional assistance, we offer paid support via info@oveleon.de.
For general help, please refer to the documentation, contao community forums, Slack, or StackOverflow.