restruct/silverstripe-cookiebar

Drop-in configurable notice about cookies

Installs: 149

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Open Issues: 1

Type:silverstripe-vendormodule

2.2.2 2024-02-21 15:51 UTC

This package is auto-updated.

Last update: 2024-03-21 15:57:28 UTC


README

Overview

This module provides a configurable notice about cookies, a link to a page about them and an 'accept' link to close the notice. It's based on the cookiebar module by Aram Balakjian & Steve Heyes, adapted to be cache-able.

Screenshot 2022-07-02 at 14 13 29

Requirements

  • SilverStripe 4 or newer

Installation

Unpack and copy the cookiebar folder into your SilverStripe project (You can call the folder whatever you like).

Now add $CookieBar just before the closing body tag

...

	$CookieBar
</body>

...

Run "dev/build" in your browser, for example: "http://www.mysite.com/dev/build?flush=all"

Layout

The included template uses bootstrap for its layout. In case the site theme does not use bootstrap, there's an optional 'sans-bs' CSS file to include which provides a fallback layout:

Requirements::css('restruct/silverstripe-cookiebar:client/dist/css/cookiebar-layout-sans-bs.css');

Fallback layout (without bootstrap): Screenshot 2022-07-02 at 14 07 06