I want to modify one of the existing banner/dialog templates that I like (e.g. the ‘slide up’). With the ‘custom’ template I need to start from scratch – can you give me the code and CSS for your existing template, so I can just modify that?




  • Avatar
    Philip Leung

    I don't believe that the current answer really resolves the original question and since 0 out of 5 people found the article helpful it appears that others agree.

    What we're looking for is the freedom of customizing the HTML, CSS and Javascript directly in the cookiebot settings but being able to base this on the existing templates that you have made instead of the one that is displayed when you first select the "custom"-template.

    I believe that this would save time for many of your users

    Comment actions Permalink
  • Avatar
    Rahmatellah Mohammed

    thanks to philip leung, i agree with you, 

    i have the same needy !!

    Comment actions Permalink
  • Avatar

    same here - any movement / news ??

    Comment actions Permalink
  • Avatar
    Richard van der Velde

    Hi guys,

    We get this question a lot, and the reason we don't just have a template available for you, is that there is none. The banner gets built by the cc.js file, which in turn gets inserted by the Cookiebot script. The way the banner looks and behaves is based on your setting in the manager.

    That being said, nothing's impossible. And if you're willing to invest some time and effort into it, here is a way to remodel a standard banner:

    First, build a banner that approximates the banner you want.
    When you're done, inspect the banner. You'll want to copy the <div> with id="CybotCookiebotDialog" and all its child nodes.
    Next, you'll want to copy the <style> with id="CookiebotDialogStyle" and it's contents.
    This will give you the "look" of the banner.

    To make the content dynamic, you'll need to replace some of the fixed values with placeholders. You can find these in the Manager by clicking the "?" icon in the Custom banner interface.

    Lastly, you'll want to add event listeners to the buttons to make them behave the way you want. You can find the available event listeners and Cookiebot commands here: https://www.cookiebot.com/en/developer/

    Comment actions Permalink

Please sign in to leave a comment.