PHPackages                             webexmachina/contao-page-cookie - 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. webexmachina/contao-page-cookie

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

webexmachina/contao-page-cookie
===============================

Contao Page Cookie bundle for Contao Open Source CMS

1.0.1(2y ago)07[1 issues](https://github.com/Web-Ex-Machina/contao-page-cookie/issues)LGPL-3.0-or-laterPHP

Since Feb 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Web-Ex-Machina/contao-page-cookie)[ Packagist](https://packagist.org/packages/webexmachina/contao-page-cookie)[ RSS](/packages/webexmachina-contao-page-cookie/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

Contao Page Cookie
==================

[](#contao-page-cookie)

This bundle adds a page protection by cookie to Contao Open Source CMS. It means a page cannot been reached until the device does not have a specific cookie. This bundle also provides the ability to generate that cookie, using Contao Forms.

Install
-------

[](#install)

Use composer to install this bundle: `composer require webexmachina/contao-page-cookie`

Or simpler: use the Contao Manager.

Bundle configuration
--------------------

[](#bundle-configuration)

1. Create the usual structure of forms and pages inside Contao
2. Inside the form, check the "Generate a cookie" checkbox
3. Fill values as needed. Note that there is two options, a cookie can be generated directly when the form is submitted or when the GET token is catched in the URL.
4. Check the box for the page you want to protected and indicate the cookie name you put inside the form.
5. That's it! The page is now protected by a cookie.

Notification Center
-------------------

[](#notification-center)

This bundle extends a little bit the tokens from Notification Center `core_form` notification. You can use the following tokens:

- `cpcCookie_name` - The cookie name
- `cpcCookie_value` - The cookie value
- `cpcCookie_duration` - The cookie duration
- `cpcCookie_token` - The cookie token

With the cookie token, you just have to add it as an URL argument, like `{{link_url::x}}?cpc_cookieToken=##cpcCookie_token##`. Since the cookie detection is on the `initializeSystem` hook, every page can validate the cookie. So you can redirect directly to the page you want to protect.

Useful links
------------

[](#useful-links)

You can consult the [Changelog](CHANGELOG.md) here or submit issues in the [Github section](https://github.com/Web-Ex-Machina/contao-page-cookie/issues).

Possible enhancements
---------------------

[](#possible-enhancements)

- Use php session instead of database query to retrieve last form cookie generated (and pass the token to use as cookie value)
- Add a cronjob to remove FormCookie entries (because either they have been already generated or they are not valid anymore)
- Apply cookie protection behavior to every protected element, and not only pages
- Add English translations
- Allow settings to use dynamic vars from the data sent through the form

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% 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 ~166 days

Total

2

Last Release

745d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33326657?v=4)[Web ex Machina](/maintainers/webexmachina)[@webexmachina](https://github.com/webexmachina)

---

Top Contributors

[![LupusVII](https://avatars.githubusercontent.com/u/4595194?v=4)](https://github.com/LupusVII "LupusVII (16 commits)")[![NodokaMurmevent](https://avatars.githubusercontent.com/u/16167605?v=4)](https://github.com/NodokaMurmevent "NodokaMurmevent (4 commits)")[![ChipsVII](https://avatars.githubusercontent.com/u/93145825?v=4)](https://github.com/ChipsVII "ChipsVII (2 commits)")

### Embed Badge

![Health badge](/badges/webexmachina-contao-page-cookie/health.svg)

```
[![Health](https://phpackages.com/badges/webexmachina-contao-page-cookie/health.svg)](https://phpackages.com/packages/webexmachina-contao-page-cookie)
```

###  Alternatives

[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

125.3k1](/packages/markocupic-calendar-event-booking-bundle)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3290.3k6](/packages/codefog-contao-news-categories)[terminal42/contao-node

Node bundle for Contao Open Source CMS

3078.1k6](/packages/terminal42-contao-node)[inspiredminds/contao-event-registration

Contao extension to allow registration for events.

134.4k](/packages/inspiredminds-contao-event-registration)[heimrichhannot/contao-pwa-bundle

A bundle to provide progressive web app support for contao.

101.2k](/packages/heimrichhannot-contao-pwa-bundle)

PHPackages © 2026

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