ErHaWeb / klaro_consent_manager

TYPO3 integration of Klaro! Consent Management. Klaro! is a powerful tool that protects the privacy and data of your visitors and helps you run a GDPR compliant website.
Other
1 stars 0 forks source link

Use klaro service in mask elements. #7

Open Pravin0711 opened 7 months ago

Pravin0711 commented 7 months ago

Hello @ErHaWeb

In my website i am using typo3 extension mask. Using this extension i created one new content elements. In this content elements i eneter youtube video url and show this youtube video on popup.

Now, my problem is i use youtube consent mechanis. so, youtube video only load when the user has given consent. But this mechanism is not working with mask elements. Because of, klaro service(record) is not present in mask elements.

can you help me? How can i use this klaro service in external elements or extension.

ErHaWeb commented 7 months ago

I had not done any explicit tests with mask content when developing this klaro extension. I need to recreate this situation in a local dev environment to better understand the problem.

In principle, contextual content within the corresponding frame should always be automatically affected by the klaro replacements (e.g. conversion from src to data-src).

I will recreate a scenario with youtube videos and provide my findings and any necessary fixes here. Any help to reproduce your case (e.g. the mask configuration) could speed up the process.

Pravin0711 commented 7 months ago

Hello @ErHaWeb

I overwrite mask typescript and its work fine for me. With update mask template according your requirements.

lib.maskContentElement = FLUIDTEMPLATE
lib.maskContentElement {
      dataProcessing {
          100 = MASK\Mask\DataProcessing\MaskProcessor
      }

      dataProcessing.11100 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
      dataProcessing.11100 {
          if.isTrue.field = tx_klaroconsentmanager_service
          table = tx_klaroconsentmanager_service
          uidInList.field = tx_klaroconsentmanager_service
          pidInList = 0
          as = contextualconsentService
      }

      settings {
          contextualconsent {
              replaceAttributes = {$plugin.tx_klaroconsentmanager.settings.contextualconsent.replaceAttributes}
              mainSectionOnly = {$plugin.tx_klaroconsentmanager.settings.contextualconsent.mainSectionOnly}
          }
      }
  }

Using abouve typoscript i geting all require klaro service in mask template.