0

is it possible to access $_COOKIES in Fluid? We have a DCE-Element where I want to check if a cookie is set. I know that there are solutions in TypoScript and conditions, but I don't know how to access global typo3-vars via DCE.

I hope it exists a solution with raw fluid code...

Oliver Hader
  • 4,093
  • 1
  • 25
  • 47

1 Answers1

0

There is a Cookie Fluid ViewHelper. CookieViewHelper: https://fluidtypo3.org/viewhelpers/vhs/master/Once/CookieViewHelper.html

Andre
  • 26
  • 4
  • 1
    Careful with this. Looking at the code, I believe it will be cached when page is generated by TYPO3. So regardless of cookie set or not, the next web site visitor will receive the result of the first visitor. Correct me if I am wrong. – User366 Dec 22 '19 at 08:50