XF 2.1 How to get cookies in a template?

Hi there,

how can I handle cookies within a template? Let's say I want to decide what to do with a given cookie value within a template like (in PHP)

PHP:
if($_COOKIE["whatever"]==1){
    //display template block A
}
else{
    //display template block B
}

Any ideas?
 

Mr. Jinx

Well-known member
I was looking for the same some time ago, and found my anwser over here (post by Kirby):
 
Top