Free
Download the package from the manager of your site.
How to download?
How to download?
Version
1.0.0-pl
Release date
07.28.2025
Downloads
0
Views
5
Warning! This component requires PHP version
7.4
or higher!
If your site uses PHP less than required, the installation of this
package could break it.
Warning! This package requires MODX not less than
2.8
!
CookieConsent for MODX
Based on osano/cookieconsent
Minimal requirements
This component integrates the osano/cookieconsent library into MODX, providing a flexible and customizable cookie consent banner, including the ability to use user country detection and country policy settings.
Based on osano/cookieconsent
This component is based on the public open source library osano/cookieconsent. It uses the same core functionality and parameter configuration, so for more complex customizations, you can refer to the osano documentation.
A callback is available in cookieconsent.loader.js, which can be used to integrate the consent/disclaimer policy with your site's functionality.
Minimal requirements
- MODX 2.8 or 3.1
- ClientConfig package installed
- php7.4 for Modx 2.8 or php8.2 for Modx 3.1
- Customizable banner: Change the text, colors and styles of the banner, coordinated with cookies using ClientConfig.
- System settings: Enable/disable the script and override the default paths to CSS and JS files.
- Multiple language support: The component supports multiple languages, and you can easily add your translations.
- No jQuery: The component does not require jQuery.
- SCSS support: The component includes SCSS source files for easy styling.
- Install the component via the MODX package manager.
- Go to Advanced -> ClientConfig and configure the settings in the Privacy Policy tab.
- The cookie consent banner will be automatically placed on your site in the future.
Enable or disable the cookie consent script. Disabled by default.cookieconsent.enabled
Path to the CSS file for the cookie contractor. If empty, the file will not be loaded.cookieconsent.css_path
Path to the cookie consent JavaScript file. If empty, the file will not be loaded.cookieconsent.js_path
Path to the cookie consent loader JavaScript file. If empty, the file will not be loaded.cookieconsent.loader_js_path
The following options are available in the Privacy Policy tab of ClientConfig:
- Title: The title text of the Cookie Consent banner.
- Message: The message text of the cookie consent banner. You can use HTML in this field.
- Policy Link: The URL of your privacy policy page. By default, it refers to the resource with ID 1 ([[~1]]).
- Window background: The color of the banner light is consistent with cookies.
- Button color: The color of the backlight buttons.
- Text color button: The text color of the text of the banner message.
- Text color: The color of the text of the banner message.
- Window opening: Opens the banner with the cookie agreement.
- Window frame: The banner frame is consistent with cookies.
- Window corner rounding: The corner banner rounding radius is consistent with cookies.