Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# custom_cookie_consent PT
<metal:macro define-macro="message">
define="ps context/@@plone_portal_state;
language ps/language;
root_url ps/navigation_root_url;
privacy_url_it string:${root_url}/it/privacy;
privacy_url_en string:${root_url}/en/privacy;"
<div class="cookielaw-wrapper">
<div style="display:none!important"
tal:condition="python: language == 'it'">
Questo sito utilizza solo cookie tecnici e di analytics, propri e di terze parti, per il corretto funzionamento delle pagine web e per il miglioramento dei servizi. Se vuoi saperne di più o negare il consenso consulta
<a tal:attributes="href privacy_url_it">l'informativa sulla privacy</a>.
Cliccando su "Ok" acconsenti all'uso dei cookie.
<div style="display:none!important"
tal:condition="python: language == 'en'">
This site uses cookies only technical and analytics, own and of third parties, for the proper functioning of the web pages and for the improvement of services. If you want to know more or withhold consent consult the
<a tal:attributes="href privacy_url_en">privacy policy</a>.
By clicking on "Ok" you consent to the use of cookies.
<!-- set language var -->
<script tal:content="string: var cookie_language = '${language}'" />
// default options
var cookie_options = {
'theme': 'dark-bottom',
'link': '',
'learnMore': '',
'dismiss': 'Ok!',
'message': $('#cookie-msg-' + cookie_language).html()
window.cookieconsent_options = cookie_options;
<script src="//"></script>
# main template inclusion
<metal:cookie use-macro="context/custom_cookie_consent/macros/message" />
# if you are using diazo
<append css:content=".cookielaw-wrapper" css:theme="body" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment