PHP code example of statikbe / craft-cookie-banner

1. Go to this page and download the library: Download statikbe/craft-cookie-banner library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

statikbe / craft-cookie-banner example snippets


{{ craft.cookieBanner.render() }}

{{ craft.cookieBanner.render({
        modal: '_site/_snippet/_cookie/_modal',
        banner: '_site/_snippet/_cookie/_banner',
        overlay: '<div class="fixed inset-0 hidden bg-black opacity-80 z-99" id="cookiebanner-overlay"></div>',
        supportIE: true,
        cookiePage: craft.entries.section('cookiePolicy').one(),
        showCookieBanner: (entry.type is defined and entry.type.handle != 'cookiePolicy')
}) }}