Home › Forums › Template Support › Cookies consent french translation › Reply To: Cookies consent french translation
Michael
Subscriber
Hi Malex,
Just replace the code from cookieconsent.html.twig with the code below
{% extends '@nucleus/partials/particle.html.twig' %}
{% block particle %}
{% assets in 'head' with {priority: 0} %}
<link rel="stylesheet" href="{{ url('gantry-theme://css/cookieconsent.min.css') }}"/>
{% endassets -%}
{% set color = particle.color %}
{% scripts in 'footer' with {priority: 10} %}
<script src="{{ url('gantry-theme://js/cookieconsent.min.js') }}"></script>
<!-- Begin Cookie Consent plugin by Silktide - http://silktide.com/cookieconsent -->
<script>
window.addEventListener("load", function() {
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "{{color.banner == "" ? "#000000" : color.banner}}",
"text": "{{color.bannertext == "" ? " #ffffff" : color.bannertext}}"
},
"button": {
{% if particle.layout == "wire" %}
"background": "transparent",
"border": "{{color.buttontext == "" ? "#000000" : color.buttontext}}",
{% else %}
"background": "{{color.button == "" ? "#f1d600" : color.button}}",
{% endif %}
"text": "{{color.buttontext == "" ? "#000000" : color.buttontext}}"
}
},
{% if (particle.layout != "default") and (particle.layout != "wire") %}
"theme": "{{particle.layout}}",
{% endif %}
{% if particle.position != "default" %}
{% if particle.position == "top2" %}
"position": "top",
"static": true,
{% else %}
"position": "{{particle.position}}",
{% endif %}
{% endif %}
"content": {
"message": "{{particle.message|e('js')}}",
"dismiss": "{{particle.dismiss}}",
"link": "{{particle.readmore}}",
{% if particle.policy != "" %}
"href": "{{particle.policy}}"
{% endif %}
}
})
});
</script>
<!-- End Cookie Consent plugin -->
{% endscripts %}
{% endblock %}
Thank you