Forum OpenACS Development: Announcement: Cookie-Consent Widget as OpenACS package

Dear all,

as a small pre-Christmas present, i've uploaded a Cookie Consent Widget to the CVS repository. This widget is based on the free and open sourced Cookie Consent Library and is Integrated into OpenACS. The purpose of the widget is for alerting users about the use of cookies on a website. It is designed to help you comply with the hideous EU Cookie Law and can be used relatively painless. It can be simply turned on/off and configured it via acs-subsite parameters. It is now in action on

Below are the details. Maybe someone will find this useful.


This package integrates the Consent Plugin with OpenACS, in particular with OpenACS subsites.

So far, this package supports on the "inform" type of cookie consent policies. When the "opt-out" or "opt-in" variants of the policies should really include all types of cookies (even session-cookies) the user would not be able to login to the site. However, most countries stick for now to the "inform" policy, and the detailed regulation are still in flux.


  • Configure the appearance of the cookie consent widget via the following parameter (on acs-subsite): CookieConsentEnabled 0|1 CookieConsentPosition bottom|top|pushdown|left|right CookieConsentLayout block|classic|edgeless|wire CookieConsentPalette oacs|honeybee|mono|neon|corporate LearnMoreLink CookieConsentDefaultPalette

  • Usage from CDN (out-of-the box) or from a local copy (download your local copy via "Site-Wide Admin" link in /acs-admin/)

  • Support for host-node-mapped subsites

  • Internationalized with OpenACS message keys


1) Install this package via the OpenACS Package Manager

2) Add this package to the templating system

- OpenACS 5.10.0d2 or newer:  
  The cookie consent widgets uses the "subsite::page_plugin"
  callback, so no changes on templates are necessary.  
  However, make sure, you update also acs-bootstrap-installer to
  5.10.0d2 or newer to obtain the updated blank-master

- OpenACS 5.9.1:  
  Add to the top of your blank-master.tcl the following snippet:
      if {[info commands ::cookieconsent::initialize_widget] ne ""} {

3) Configure in the parameters of the sub-site (e.g. the main subsite) the section "Cookie Consent"


The implementation uses nx from the next-scripting framework.

which is automatically installed for XOTcl2 via /xowiki/naviserver-openacs

It works best with OpenACS 5.10.0d2 or newer, but works as well with 5.9.1 (see INSTALLATION section above) or earlier versions supporting Content Security Policy (CSP), and probably with earlier versions as well, when CSP code is commented out.

Posted by Benjamin Brink on
Thank you, indeed, Gustaf!

Writing a package for this was on my agenda for Q1 2018..