PHPackages                             taitava/silverstripe-eucookielawpopup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. taitava/silverstripe-eucookielawpopup

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

taitava/silverstripe-eucookielawpopup
=====================================

A wrapper for wimagguc/jquery-eu-cookie-law-popup for easy usage in SilverStripe CMS.

1.2.0(7y ago)027BSD-3-ClausePHP

Since Nov 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Taitava/silverstripe-eucookielawpopup)[ Packagist](https://packagist.org/packages/taitava/silverstripe-eucookielawpopup)[ RSS](/packages/taitava-silverstripe-eucookielawpopup/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (2)Versions (8)Used By (0)

Taitava/silverstripe-eucookielawpopup
=====================================

[](#taitavasilverstripe-eucookielawpopup)

Uses jQuery and [wimagguc/jquery-eu-cookie-law-popup](https://github.com/wimagguc/jquery-eu-cookie-law-popup) to create a popup element telling the visitor that the website uses cookies. Note that this module is basically just a wrapper on the latter mentioned library in order to allow easy implementations in SilverStripe projects.

Requirements
------------

[](#requirements)

This module requires SilverStripe 4.x framework. The CMS module is also required.

Installation
------------

[](#installation)

### 1. Install the module using composer

[](#1-install-the-module-using-composer)

```
composer require "taitava/silverstripe-eucookielawpopup:*"
```

### 2. Add this HTML snippet somewhere in your themes/\*\*\*/templates/Page.ss template

[](#2-add-this-html-snippet-somewhere-in-your-themestemplatespagess-template)

```

```

The popup message will be rendered into that element. If you want to change the `class` attribute to something else, or use an `ID` attribute instead of a `class`, you can configure a custom jQuery selector in your application's YAML config:

Create a file *app/\_config/eucookielawpopup.yml*:

```
---
Name: customeucookielawpopup
After:
  - '#eucookielawpopup'
---
Taitava\EUCookieLawPopup\EUCookieLawPopup:
  popup_element_jquery_selector: '.eupopup'
```

Remember to run */dev/build?flush=all* in your browser after changing the selector.

### 3. All configuration options

[](#3-all-configuration-options)

These are the default values:

```
---
Name: customeucookielawpopup
After:
  - '#eucookielawpopup'
---
Taitava\EUCookieLawPopup\EUCookieLawPopup:
  enabled: true #If true, 'EU cookie law popup' related CSS and JavaScript files are automatically defined as requirements during each page request.
  use_jquery_from_framework: true #If true, adds jquery from SS framework as a requirement automatically. Requires $enabled config value to be true too, otherwise does nothing.
  popup_element_jquery_selector: '.eupopup' #You must have an HTML element matching this jQuery selector located somewhere in your HTML code. For example:  The element can be empty.
  cookie_policy_page_id: false #If this is an integer, the "learn more" link in the popup box will take the user to this page.
  options:
    cookiePolicyUrl: "/cookie-policy" #This option is ignored if cookie_policy_page_id is not false.
    popupPosition: "top"
    colorStyle: "default"
    compactStyle: "false"
    popupTitle: "This website is using cookies"
    popupText: "We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on this website."
    buttonContinueTitle: "Continue"
    buttonLearnmoreTitle: "Learn more"
    buttonLearnmoreOpenInNewWindow: "true"
    agreementExpiresInDays: 30
    autoAcceptCookiePolicy: "false"
    htmlMarkup: "null"
```

### 4. Optional template variables

[](#4-optional-template-variables)

You can use these variables in any of your templates for additional features.

- $CookiePolicyLink: An easy way to get the url of the cookie policy page that you have already configured in the YAML configuration using either the 'options.cookiePolicyUrl' option or the 'cookie\_policy\_page\_id' option.
- $DeleteAllCookiesLink: You can create a link like `Cancel consent on receiving cookies and remove existing cookies`. When the user clicks this link, all cookies created by any javascript libraries are deleted and the cookie law popup box will reappear to notify the user that she hasn't accepted to receive cookies anymore. Note that if you use this variable in your template, an additional JavaScript file will be automatically included as a requirement, so it will increase the page load time a little bit.

Future plans
------------

[](#future-plans)

- Make it possible to configure the `cookiePolicyURL` in the admin panel by selecting a page in SiteConfig.
- Perhaps a predefined way to initialize JavaScript snippets (that use cookies) *after* the user has accepted to receive cookies. It is possible even now, but requires some work: [http://www.wimagguc.com/2018/05/gdpr-compliance-with-the-jquery-eu-cookie-law-plugin/#gdpr\_compliance](http://www.wimagguc.com/2018/05/gdpr-compliance-with-the-jquery-eu-cookie-law-plugin/#gdpr_compliance)

Have your own ideas? Please let me know in the issues! :) Pull requests are also welcome.

Author
------

[](#author)

The original JavaScript library: [wimagguc/jquery-eu-cookie-law-popup](https://github.com/wimagguc/jquery-eu-cookie-law-popup).

The SilverStripe module: Jarkko Linnanvirta

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

4

Last Release

2738d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/611d4d836f6db7ba7357ea174bf48ab8cf86af5ac40be4a7a6101e67267333f9?d=identicon)[taitava](/maintainers/taitava)

---

Top Contributors

[![Taitava](https://avatars.githubusercontent.com/u/13002142?v=4)](https://github.com/Taitava "Taitava (15 commits)")

---

Tags

silverstripe

### Embed Badge

![Health badge](/badges/taitava-silverstripe-eucookielawpopup/health.svg)

```
[![Health](https://phpackages.com/badges/taitava-silverstripe-eucookielawpopup/health.svg)](https://phpackages.com/packages/taitava-silverstripe-eucookielawpopup)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
