PDA

View Full Version : Is it possible to use template if conditional with cookies?


Spit-wad
07-11-2014, 04:42 AM
Is it possible to used template if conditional with cookies?

Right now i'm trying to do something like this:

<vb:if condition="$_COOKIE[$post['postid']"] == "Set" >

</vb:if>

on my postbit and for some reason those lines break the entire thing.

Dave
07-11-2014, 08:05 AM
It probably didn't work because of the extra double quotes after the first closing square bracket. I can't test it now, but the following should work:

<vb:if condition="$_COOKIE[$post['postid']] == 'Set'">

</vb:if>