In Borlabs Cookie 2.0 you can define your own template for the Cookie Box and Cookie Preferences, which will not be overwritten during an update.
Layouts and files
The template files can be found in the /templates/-folder in the plugin of Borlabs Cookie.
- Bar: cookie-box-layout-bar.html.php
- Bar - Advanced: cookie-box-layout-bar-advanced.html.php
- Bar - Slim: cookie-box-layout-bar-slim.html.php
- Box: cookie-box-layout-box.html.php
- Box - Advanced: cookie-box-layout-box-advanced.html.php
- Box - Slim: cookie-box-layout-box-slim.html.php
The template of the Cookie Preferences is called cookie-box-preferences.html.php.
Create custom Layout
In your theme create the folder plugins and in it the folder borlabs-cookie.
Copy the file of the desired layout into this folder.
Beispiel: /wp-content/themes/hello-child/plugins/borlabs-cookie/cookie-box-layout-box.html.php
Key Selectors
The following selectors must be present in your template file if they were present in the original template file:
CSS Classes
- _brlbs-btn-switch-status
- BorlabsCookie
- _brlbs-bar
- _brlbs-bar-wrap
- _brlbs-box
- _brlbs-box-wrap
- .container (has be a child-element of .cookie-box and .cookie-preference)
- .cookie-box
- .cookie-preference
Data Attributes
- data-cookie-accordion
- data-cookie-accordion-parent
- data-cookie-accordion-status
- data-cookie-accordion-target
- data-cookie-accept
- data-cookie-back
- data-cookie-individual
- data-cookie-refuse
- data-borlabs-cookie-switch
IDs
- BorlabsCookieBox