bwein-net / contao-dismissable-banner-element
Dismissable Banner Element for Contao Open Source CMS
Fund package maintenance!
rabauss
Installs: 754
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.13 || ^5.0
- symfony/config: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/http-foundation: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
Requires (Dev)
- contao/manager-plugin: ^2.0
README
This Bundle provides a dismissable banner content element. The dismiss of the banner is stored in the local storage of the browser. The banner will also be shown again after the configured expiry time (default: 30 days) or if it has been modified in the back end since the dismiss of the user.
Installation
Install the bundle via Composer:
composer require bwein-net/contao-dismissable-banner-element
Configuration
After the installation you can add and configure new content elements "Dismissable banner" to the articles. You can fill a headline, text, optional link and expiry time of the dismiss for the local storage (default: 30 days).
You can even set some css classes of the included styling for the banner: success, danger, warning, info
Styling
You can override the template ce_dismissable_banner.html5
and remove the lines for the included stylesheets or you can extend the template and add the following lines to your new template:
// templates/ce_dismissable_banner_nocss.html5 <?php $this->extend('ce_dismissable_banner'); ?> <?php $this->noCss = true; ?>
Caution: If your remove the data
attributes of the enclosing container or the Javascript asset, the extension will stop working!
Screenshots
Back end
Front end
Sponsors
This Extension was commissioned and financed by https://www.medienflieger.de/