Open Closed

GDPR Cookie bar customization [Angular] #8127


User avatar
0
Bryan-EDV created
  • ABP Framework version:v8.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

How can i customize the GDPR cookie consent bar?


13 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello ,

    Can you please check this https://abp.io/docs/latest/modules/gdpr#cookie-consent

    Thank you ,

  • User Avatar
    0
    Bryan-EDV created

    Hi, i've done all that, but how do customize the UI?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The component is rendered by AbpCookieConsentViewComponent(Volo.Abp.Gdpr.Web.Pages.Gdpr.Components.CookieConsent;)

    You can override it.

  • User Avatar
    0
    Bryan-EDV created

    hi

    The component is rendered by AbpCookieConsentViewComponent(Volo.Abp.Gdpr.Web.Pages.Gdpr.Components.CookieConsent;)

    You can override it.

    Hi, thanks for the reply,

    Can i customize this in my angular proj? instead of MVC?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you inspect this element with dev tool to see if it is a angular or MVC component?

  • User Avatar
    0
    Bryan-EDV created

    hi

    Can you inspect this element with dev tool to see if it is a angular or MVC component?

    it looks like this:

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, This is angular component, I will ask our angular team

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello, you can utilize the component replacement documentation and the key should be eGdprConfigComponents.CookieConsent

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    If you only want to change the text you can change these localization texts.

    "ThisWebsiteUsesCookie": "This website uses cookies to ensure you get the best experience on the website.",
    "CookieConsentAgreePolicies": "If you continue to browse, then you agree to our {0} and {1}.",
    "CookieConsentAgreePolicy": "If you continue to browse, then you agree to our {0}.",
    
  • User Avatar
    0
    alper created
    Support Team Director

    @Bryan-EDV if you want to update only texts you can use the localization text files. @maliming provided you the localization keys. if you add these keys in your localization file (en.json) it'll be changed. also you can change the colors and other styles with simple CSS overrides. but if you want to radically change this bar, you need to replace this component as stated here.

  • User Avatar
    0
    Bryan-EDV created

    @Bryan-EDV if you want to update only texts you can use the localization text files. @maliming provided you the localization keys. if you add these keys in your localization file (en.json) it'll be changed. also you can change the colors and other styles with simple CSS overrides. but if you want to radically change this bar, you need to replace this component as stated here.

    Hi, Thanks for the reply, I explored doing css overrides but this component is not in the classes that i can overwrite, so i think i'm left with replacing the whole component.

    Is this the correct replaceable component? I am on abp v8.3, eGdprConfigComponents.CookieConsent does not work

    `import { eGdprComponents } from '@volo/abp.ng.gdpr';

    key : eGdprComponents.PersonalData `

    I'm also under the impression that all source code will be included in the Enterprise version (which my company has purchased), however i didn't find any for this cookie consent bar. can you kindly point me to it? thank you.

  • User Avatar
    0
    alper created
    Support Team Director

    Sure you can download its source-code.

    First way to use the ABP Studio

    You can replace the module project references with source-code https://abp.io/docs/latest/studio/solution-explorer#replace-with-source-code


    Second way is using ABP CLI

    abp get-source Volo.Abp.Gdpr
    

    You can see the CLI commands to download source code for the other modules in Suite > Templates page.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, you can use the following command to install the source-code for the module (with the angular files):

     abp get-source Volo.Gdpr --old
    
Made with ❤️ on ABP v9.1.0-preview. Updated on October 22, 2024, 09:35