GDPR-compliant cookie consent banner for Contensio. Fully customizable text, accept/decline buttons, privacy policy link, position (top or bottom), and dark/light style. Visitor preference is stored in localStorage - no database table required.
composer require contensio/plugin-cookie-consentThen in the Contensio admin: Plugins → Enable next to "Cookie Consent".
- Download the latest release ZIP from the releases page
- In Contensio admin: Plugins → Install Plugin → upload the ZIP
- Click Enable
After enabling:
- Go to Tools → Cookie Consent (or Configuration → Cookie Consent)
- Set your banner text, accept/decline labels, and optional privacy policy URL
- Choose position (bottom or top) and style (dark or light)
- Use the live preview to see your changes before saving
- Save - the banner appears immediately on your site
- The banner is injected into every frontend page via the
contensio/frontend/body-endrender hook. No theme files are modified. - When a visitor clicks Accept or Decline, the preference is saved in
localStorageunder the keycontensio_consentwith a value ofacceptedordeclined. - On subsequent page loads, the banner checks
localStoragefirst and stays hidden if a preference already exists. - The banner never appears for admin users browsing the frontend while logged in to the admin panel (they have already interacted with it as visitors if needed).
Other plugins that set cookies or load tracking scripts (e.g. Google Analytics) can check the visitor's preference before running:
if (localStorage.getItem('contensio_consent') === 'accepted') {
// load analytics, set cookies, etc.
}- It does not automatically block cookies set by other scripts. It is a notice and preference mechanism - you are responsible for conditionally loading cookie-setting scripts based on the stored preference.
- It does not distinguish between cookie categories (necessary, analytics, marketing). If you need granular category consent, consider extending this plugin or using a dedicated consent management platform.
- Settings stored as a single JSON blob in the core
settingstable (module = cookie_consent,setting_key = config). No migrations needed. - Frontend banner is pure HTML + inline CSS + a small inline
<script>block (~40 lines). No JavaScript framework, no external requests. - Admin settings page includes a live preview that updates as you type.
- A settings hub card is injected into the admin Configuration page via the
contensio/admin/settings-cardshook.
AGPL-3.0-or-later. Copyright © 2026 Iosif Gabriel Chimilevschi. Operated by Host Server SRL.