Daniel Tomé Fernåndez danieltomefer@gmail.com, (*1)
Introduction:
This plugin provide us a top/bottom bar with cookie policy and a button to accept it., (*2)
Image:
, (*3)
Instalation:
To install this module you must follow this steps:, (*4)
1- In your composer.json you must write:, (*5)
"require": {
"dtome/cookie-policy": "dev-master",
},
and, (*6)
"autoload": {
"psr-4":{
"cookiepolicy\\" : "vendor/dtome/cookie-policy"
}
}
2- Then you must run the following command line composer update, (*7)
Configuration:
1-Enable the module on your application.config.php., (*8)
'modules' => array(
'cookiepolicy',
),
2- In your view/layout.phtml paste this code under javascript files call (inside of head tag)., (*9)
3- You must copy the data files to public folder:, (*10)
data/cookieJs.js to public/js
data/cookieStyle.css to public/css
4- In your layout.phtml define the javascript file and css file like the following:, (*11)
->prependStylesheet($this->basePath('css/cookieStyle.css'))
->prependFile($this->basePath('js/cookieJs.js'))
Usage:
On your layout.phtml you must add :, (*12)
<?php echo $this->cookiePolicy(); ?>