Download the PHP package sandstorm/neos-cookieconsent without Composer

On this page you can find all versions of the php package sandstorm/neos-cookieconsent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package neos-cookieconsent

Sandstorm CookieConsent

THIS PACKAGE IS NO LONGER MAINTANED

You should have a look at our CookiePunch Package

This package helps you create a cookie consent that is more fine-grained than most others.

Table of contents

Compatibility and Maintenance

This package is currently being maintained for Neos 4.3 LTS. It is stable, we use it in our projects.

Neos / Flow Version Sandstorm.CookieConsent Version Maintained
Neos 4.3 LTS, Flow 5.3 LTS 1.x Yes

Quickstart

1. Add your own derived Node Type.

Here we decided to place the link to your privacy policy in the inspector of the node type of CookieConsent. We also specify a tab and a group in which it will appear.

2. Add the Node Type somewhere to your page

For example as child node:

3. Add rendering for your Node Type

This package provides you with a rendering component that takes care of loading the javascript and css needed. It also configures the library so it knows about any apps for which you need a consent by the user.

Your fusion component acts as the integrational component, Sandstorm.CookieConsent:Component.CookieConsent is the presentational component.

A simplified example:

4. Set the privacy policy link

In this example it was decided to let the editor change the privacy policy link in the Neos inspector.

The example assumes you placed it directly below your root page (= site-node). Make sure to adapt to your node paths depending on where you placed the node.

5. Translate the modal (optional)

The cookie consent can be translated. It has reasonable defaults for many languages and will try to determine the language of your page automatically (for example by looking at your <html lang> attribute. For available translations see the github repo.

Note the fusion key _cookieModalTranslations. It reads more properties from the CookieConsent nodetype that we defined in step 1. One will be added as an example below. You can also provide static strings and not let the editor change the keys in the inspector in the Neos backend - it's up to you. Here the editor is supposed to provide their own texts.

The easiest way to find out what you can translate is to change the language of the cookieConsent to something that does not exist, e.g. "foo" (see in the renderer of the following component, there the language key is passed as a property). In the frontend it will then fail to load translations and tell you the path where it was looking for the translation.

6. Add apps that need a users consent

The package comes with a few apps (e.g. Google Analytics liable for consent already preconfigured that you can just add from the Neos backend to the collection of app below your CookieConsent node.

In case you need an app that's not yet included, simply copy one of the existing node types and fill in the necessary information.

Please open a pull request or an issue with your apps configuration so others can benefit from it :)

7. Place your new Component in your markup

Render your new component somewhere on your page.

body.some.fusion.path.cookieConsent = Vendor.Site:CookieConsent

8. Placing the Cookie-Manager button

To allow your users to revisit their cookie settings, you need to place a special button component somewhere on your site. We already provide a NodeType and its respective fusion component for this. Simply allow 'Sandstorm.CookieConsent:OpenCookieManagerButton': true in one of your content collection configurations and add the component to your site (preferably on your data policy page).

Customization

TODO

1. Thing to customize

2. Thing to customize

Next steps / possible further development

License & Copyright

MIT-Licensed, (c) Sandstorm Media GmbH 2020


All versions of neos-cookieconsent with dependencies

PHP Build Version
Package Version
Requires neos/flow Version *
neos/neos Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sandstorm/neos-cookieconsent contains the following files

Loading the files please wait ....