Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sample in the Readme which explain how to display the cookies popup #5

Open
lemitchv opened this issue Mar 4, 2024 · 1 comment

Comments

@lemitchv
Copy link

lemitchv commented Mar 4, 2024

Bonjour,

je viens d'installer le bundle, et je n'ai pas compris comment afficher la popup de consentement.

Serait-il possible d'ajouter dans le readme un exemple ou la marche à suivre ?

Merci d'avance.

@benji07
Copy link
Member

benji07 commented Mar 19, 2024

A partir du moment où tu va verifier si l'utilisateur a un consentement la popup va être injecté automatiquement a la fin du body

{% if has_user_consent() %}
    <script>
        // your script requiring consent here
    </script>
{% endif %}

https://github.com/Elao/ElaoConsentBundle/blob/master/src/EventListener/ConsentEventSubscriber.php#L89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants