PHPackages                             takepart-media/statamic-oreos - 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. takepart-media/statamic-oreos

AbandonedArchivedStatamic-addon[Utility &amp; Helpers](/categories/utility)

takepart-media/statamic-oreos
=============================

Cookie consent manager for Statamic 3

v1.3.0(3y ago)619.2k↓44.2%3[2 issues](https://github.com/takepart-media/statamic-oreos/issues)proprietaryPHP

Since Nov 3Pushed 3y ago2 watchersCompare

[ Source](https://github.com/takepart-media/statamic-oreos)[ Packagist](https://packagist.org/packages/takepart-media/statamic-oreos)[ RSS](/packages/takepart-media-statamic-oreos/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (12)Used By (0)

Statamic Oreos
==============

[](#statamic-oreos)

> Cookie consent manager for Statamic 3.

Features
--------

[](#features)

*Oreos* gives you the opportunity to manage cookie consents on two levels: groups of consents and the regarding settings are managed via the addons’ config-file, whereas the corresponding titles and descriptions are managed from within the control panel. This enables your authors to not only edit texts on the fly, without the need to deploy the site or the developer to open their editor, but also to manage texts in multi-site (and multi-lang) installations.

- Manage cookies via addon config file
- Manage texts for cookies via control panel
- Permissions for control panel views (view and edit)
- Customizable views for formular (antlers tag, e.g. for privacy page) and popup (the one shown if no cookie is set)

How to Install
--------------

[](#how-to-install)

You can search for this addon in the `Tools > Addons` section of the Statamic control panel and click **install**, or run the following command from your project root:

```
composer require takepart-media/statamic-oreos
```

After that, publish the config file to customize your consent groups and to tweak other settings.

```
php artisan vendor:publish --tag=oreos-config
```

To customize the user experience, you are free to publish the views to customize them based on your needs:

```
php artisan vendor:publish --tag=oreos-views
```

How to Use
----------

[](#how-to-use)

### Default views

[](#default-views)

#### Popup

[](#popup)

To add the popup with the included form to your layout, use the `oreos:popup` tag to place it at it's belonging position (usually near the end of the body as first-level child, e.g. in your main layout file):

**resources/views/layout.antlers.html**

```
        ...

        {{ oreos:popup }}

```

When saved, the page gets reloaded (technically, we got redirected to the referers page after saving within the posted controller's action at `/!/oreos/save`), so all statements to check for consents should return the correct setting.

#### Formular

[](#formular)

To recall the settings, usually within the privacy statements, add the `oreos:form` tag. This can be done within your content, but be sure to allow antlers to be parsed:

```
{{ oreos:form }}
```

This will show just the *form from within the popup*, not the popup itself (everything around the form). By passing parameters, you can show or hide certain elements. If you are using custom views, this feature might be broken. The default config (if parameters are omitted, the default value will kick in):

```
{{ oreos:form
    description="true"
    acceptall="true"
    cancel="true"
    reset="false"
}}
```

### Custom views

[](#custom-views)

Pretty sure you want to customize the experience for your visitors: we got you covered. With the help of our tags, you can pretty easily overwrite and customize both the popup as well as the form – or just some part of it.

First, publish the addon’s views:

```
php artisan vendor:publish --tag=oreos-views
```

This should create the two files inside the folder `/resources/views/vendor/oreos/` for the form (`form.antlers.php`) and the popup (`popup.antlers.html`). Those files can be customized as you wish. You even have the possibility to completely omit our views and just use our backbone, by using our controller endpoint and our `oreos` tag from within your own partials or templates. Have a look at `form.antlers.php` how everything is wired up!

### Use cookie groups elsewhere

[](#use-cookie-groups-elsewhere)

With the help of the `oreos` tag, you can display your cookie groups with all relevant information everywhere on your website:

```
{{ oreos }}
    {{ title }}
    {{ description }}
    Consent: {{ consent ? 'true' : 'false' }}
{{ /oreos }}
```

The following attributes are augmented within the oreos-loop:

HandleType Description**`handle`**`string`The group handle you configured inside the `config/oreos.php`**`title`**`string`The title for your group as written in the control panel (localized).**`description`**`string`The description for your group as written in the control panel (localized).**`details`**`array`Further details as bard field written in the control panel (localized).**`consent`**`bool`If the user has given their consent or not.**`explicit`**`bool`If the cookie is explicitly set.**`required`**`bool`If the consent is required.**`default`**`bool`If the checkbox is checked by default.**`checked`**`bool`If the checkbox in the form is checked or not. Calculated based on consent, explicit, default and required.### Check for consents

[](#check-for-consents)

To check if a cookie group was given consent to, use the `oreo:yourgrouphandle` tag:

```
{{ if {oreo:yourgrouphandle} }}
    do something if yourgrouphandle is checked
{{ else }}
    do something if yourgrouphandle is *not* checked
{{ /if }}
```

### Usage with static caching

[](#usage-with-static-caching)

When used with [static caching enabled](https://statamic.dev/static-caching), without any further changes, your site will throw a `419 page expired` error. For the plugin to work, you have to exclude the `oreo`-popup as well as all checks from cache by using the `{{ nocache }}`-tag:

```
# resources/views/layout.antlers.html

{{ nocache }}
    {{ oreos:popup }}
{{ /nocache }}

```

```
# resources/views/partials/embed.antlers.html

{{ nocache }}
    {{ if {oreo:embeds} }}
        {{ embed_code }}
    {{ /if }}
{{ /nocache }}

```

Authors
-------

[](#authors)

- Dennis Dick,
- Jakob Plöns,

© 2021 TAKEPART Media + Science GmbH

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.2% 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 ~46 days

Recently: every ~103 days

Total

10

Last Release

1244d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68af371ee0a4219abacbe3e7ea6b79ce485160cd7a482ce325b2c0b8ead3e76a?d=identicon)[takepart-media](/maintainers/takepart-media)

---

Top Contributors

[![jakobploens](https://avatars.githubusercontent.com/u/1315500?v=4)](https://github.com/jakobploens "jakobploens (34 commits)")[![jackmcdade](https://avatars.githubusercontent.com/u/44739?v=4)](https://github.com/jackmcdade "jackmcdade (4 commits)")[![Pantastisch](https://avatars.githubusercontent.com/u/45369229?v=4)](https://github.com/Pantastisch "Pantastisch (1 commits)")

---

Tags

cookiephpstatamicstatamic-addon

### Embed Badge

![Health badge](/badges/takepart-media-statamic-oreos/health.svg)

```
[![Health](https://phpackages.com/badges/takepart-media-statamic-oreos/health.svg)](https://phpackages.com/packages/takepart-media-statamic-oreos)
```

PHPackages © 2026

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