KaufmannDigital / KaufmannDigital.GDPR.CookieConsent

A ready-to-run package, that integrates an advanced cookie consent banner into your Neos CMS site.
https://www.kaufmann.digital/neos-cms/plugins/dsgvo-gdpr-cookie-consent
GNU General Public License v3.0
26 stars 11 forks source link

Also set documentNode context in CookieSettingsPage.fusion #49

Closed patricekaufmann closed 1 year ago

patricekaufmann commented 1 year ago

Homepage rendering that relies on documentNode context fails when being rendered in backend since the context is not correct.

Suggestion:

    renderer = Neos.Fusion:Renderer {
        type = ${site.nodeType.name}
        @context.node = ${site}
        @context.documentNode = ${site}

        @process.addCookieSettings = ${String.pregReplace(value, '/(.*)<\/body>(.*)/s', '$1' + cookieSettings + "</body>$2")}
    }
Nikdro commented 1 year ago

Done with todays releases :)