Helper: social/cookienotice

« All helpers

Helper for displaying the cookie usage notice required by the EU. All parameters are optional.

Based on https://cookieinfoscript.com/

In PHP code, call it like this:

echo $this->run (
    'social/cookienotice',
    [
        'bg' => 'f5f5f5'
        'link' => 'f90'
        'msg' => 'C is for cookie'
    ]
);

In a template, call it like this:

{! social/cookienotice
    ?bg=f5f5f5
    &link=f90
    &msg=C is for cookie !}

Parameters:

  • bg - Background colour code (default: eee).
  • fg - Banner text colour code (default: 333).
  • link - Link text colour (default: 31a8f0).
  • linkbg - Link background colour (default: f1d600).
  • fontsize - Font size (default: 14px).
  • height - Banner height (default: 31px).
  • zindex - Z-index of the banner (default: 255).
  • align - Text alignment (default: center).
  • position - Position (top or bottom, default: bottom).
  • msg - The message to display.
  • moreinfo - A link to your cookie policy (optional).
  • cookie - Cookie name (default: we-love-cookies).