volto-cookie-banner
v2.1.0
Published
Volto cookie banner integration
Downloads
285
Keywords
Readme
volto-cookie-banner
Volto cookie banner integration addon.
To be used with: collective.volto.cookieconsent
To be used with mrs-developer, see Volto docs for further usage informations.
Usage
If you're using Volto < 12, then use v1.0.2
Wherever you want to add the component, import and use it like this:
import CookieBanner from 'volto-cookie-banner/CookieBannerContainer';
const YourAppComponent = () => <CookieBanner />;
A suggested way is to use appExtras
from settings object:
export const settings = {
...defaultSettings,
appExtras: [
...defaultSettings.appExtras,
{
match: '',
component: CookieBanner,
},
],
};
Add a widget for the controlpanel
Without any other customization, in the controlpanel you'll find a text area which will accept a json object. This is the job for volto-multilingual-widget.
import MultilingualWidget from 'volto-multilingual-widget';
export const widgets = {
...defaultWidgets,
id: {
...defaultWidgets.id,
cookie_consent_configuration: MultilingualWidget(),
},
};
Styling
If you want to change or adapt styles, you should start adapting volto-cookie-banner.css and react-cookie-consent styling docs.
Translations
This product has been translated into:
- Italian
- English
Please, contribute to this project adding translations for your language.