Wait two seconds…
Simple effect which shows you how flexible the Interaction panel features. So, this popup has the next logic. It opened automatically after 2 seconds, if the user clicks on the button, a popup will not show up again but after some period of time, a cookie will be cleaned and he will see the popup again
To do this popup, I added a Container with text. You can add the design of the container inside panels, but it’s important to add Position Fixed inside Class. This is because we want to edit popup inside the admin area and the class system has the option to enable styles only for the frontend side (click on the filter icon for this)
So, I created class cookbanner and added it as local class to container. Then added fixed position, size and 100% shifting to hide it
Now. on button, I need to add interaction layer with On Click trigger and two actions
- Save cookie
- Remove active class
Here is important to add proper storage time. Because by default it’s in seconds, so you need to have big value if you want to save as 30 days. (86400*30)
And last thing – I add interaction layer with On load for container and Action “add class”. But i need also to choose Condition where i check first if user has cookie (which is added by button click)