I would like to display a div on the first page view made by the visitor.
The aim is to show a cookie directive message that shows on the home page on first view but doesn't keep reappearing each time they return to the home page.
This code works in a normal php page:
See it here: http://www.graphicz.eu.com/kook.php
However, if I put the same code in the outer layout of my Sellerdeck store thus:
It doesn't work - see it here: http://www.graphicz.eu.com/minimal/
The expression 'Its your first time being here' top left doesn't change as it does in the plain php page above.
Please can anyone point me in the right direction?
Thank you.
The aim is to show a cookie directive message that shows on the home page on first view but doesn't keep reappearing each time they return to the home page.
This code works in a normal php page:
Code:
<?php if(isset($_COOKIE['div'])){ echo "<div>I can tell you've been here before</div>"; } else { setcookie('div', true, 3600 * 24 + time()); //hold for 1 day echo "<div>Its your first time being here</div>"; } ?>
However, if I put the same code in the outer layout of my Sellerdeck store thus:
Code:
<actinic:block php="true" > if(isset($_COOKIE['div'])){ echo "<div>I can tell you've been here before</div>"; } else { setcookie('div', true, 5184000 + time()); //hold fo 2 months echo "<div>Its your first time being here</div>"; } </actinic:block> <actinic:block php="true" >
The expression 'Its your first time being here' top left doesn't change as it does in the plain php page above.
Please can anyone point me in the right direction?
Thank you.
Comment