Setup 

TypoScript setup is loaded by the Site Set and by the Static TypoScript Include. It registers frontend assets, Fluid paths, the contextual consent layout integration, and selected runtime settings.

Service filtering 

services.whitelist

services.whitelist
type

string (comma-separated list)

Default

''

Path

plugin.tx_klaroconsentmanager.settings

Restrict the available services to the given list of service names. If a whitelist is defined, only the listed services are active. Any configured services.blacklist is ignored when a whitelist is present.

Example:

plugin.tx_klaroconsentmanager.settings.services.whitelist = google-analytics, matomo
Copied!

services.blacklist

services.blacklist
type

string (comma-separated list)

Default

''

Path

plugin.tx_klaroconsentmanager.settings

Disable specific services by name. All other services remain active. The blacklist is evaluated only if no services.whitelist is set.

Example:

plugin.tx_klaroconsentmanager.settings.services.blacklist = facebook-pixel
Copied!

Configuration overrides 

configuration.[...]

configuration.[...]
type

Array

Default

[]

Path

plugin.tx_klaroconsentmanager.settings

The entries made here from TypoScript are merged into the configuration array shortly before the transformation into the JavaScript configuration. Use the lowerCamelCase notation of the final Klaro JavaScript keys.

Nesting in the TypoScript override cannot currently be mapped reliably for list-like values such as services without an associative index. There is no plausibility check for the keys used.

There is currently no type conversion based on the Klaro properties. Use only known, non-nested keys and string values unless you have verified the generated JavaScript configuration.

Example

plugin.tx_klaroconsentmanager.settings.configuration {
    elementID = overwrittenID
    cookieName = overwrittenCookieName
}
Copied!

TypoScript condition 

The extension registers the TypoScript condition variable klaroIsActive. It returns true when a Klaro configuration is active for the current request. The feature overview contains a more complete integration example: TypoScript condition to check if Klaro is used.

[klaroIsActive]
page.10 = TEXT
page.10.value = Klaro is active
[end]
Copied!

Fluid ViewHelper 

The Fluid namespace klaro is registered globally. Use {klaro:isActive()} to branch Fluid output depending on the active Klaro configuration. The feature overview contains a template example: Fluid ViewHelper to check if Klaro is used.

<f:if condition="{klaro:isActive()}">
    <f:then>
        Klaro is active.
    </f:then>
    <f:else>
        Klaro is inactive.
    </f:else>
</f:if>
Copied!