TypoScript Settings
This is a list of all TypoScript settings for this extension
| Constants | Description | Default |
|---|---|---|
| cookieName | The name for the cookie | cookie_consent |
| expiryDays | Number of days until the cookie expires | 365 |
| containerId | HTML container ID for the consent modal | cookie-consent |
| hideIfJavaScriptDisabled | Keep the modal hidden if JavaScript is disabled | 1 |
| pushConsentToTagManager | Push an event to Google Tag Manager when the user submits consent | 0 |
| lazyloading |
Open the consent modal on first user interaction (e.g., move, click, scroll).
This may help improve the page speed score.
| 0 |
| lazyloadingTimeout | Timeout (in seconds) until the lazy-loaded consent modal opens automatically | 120 |
| hideCategoriesInOverview | Hide category titles in the consent modal | 0 |
| addNecessaryCookieCategoryInList | Include necessary cookie category in the list plugin | 0 |
| ajaxPageType | TYPO3 page type used for XHR requests | 8641 |
| addMarkupToFooter | Insert the consent modal HTML into the footer | 1 |
| addConfiguration | Include configuration settings as JSON in the header | 1 |
| addJavaScript | Include the default JavaScript | 1 |
| addStylesheet | Include the default stylesheet | 1 |
| disableConsent | Disable the consent modal | 0 |
| addLanguageToCookie | Add the current language to the consent cookie | 0 |
TypoScript Condition
The extension provides the cookieConsent() TypoScript condition function. It reads the consent cookie and returns a wrapper with helper methods for TypoScript conditions.
Use getConsentOptions() to access the accepted cookie option identifiers:
['youtube' in cookieConsent().getConsentOptions()]
lib.youtubeDsgvo = 1
[end]
Use hasOption() to check a single cookie option identifier:
[cookieConsent().hasOption('youtube')]
lib.youtubeDsgvo = 1
[end]
Use hasConsent() to check whether the user has submitted a consent decision:
[cookieConsent().hasConsent()]
lib.cookieConsentGiven = 1
[end]
By default, cookieConsent() reads the default cookie name cookie_consent. If you configured a custom cookie name, pass it as the first argument:
[cookieConsent('custom_cookie_name').hasOption('youtube')]
lib.youtubeDsgvo = 1
[end]
When addLanguageToCookie is enabled, the function automatically reads the consent state and option identifiers for the current site language.